title: Removed empty array element to json_encode after
body: <p>I have simple array</p>
  
  <pre><code>$a = ['a', '', 'b','c','d'];
  </code></pre>
  
  <p>if i <strong>json_encode</strong> it i ll have</p>
  
  <pre><code>["a","","b","c","d"]
  </code></pre>
  
  <p>But if i ll try to remove empty value, with <strong>array_filter</strong> or <strong>array_diff</strong></p>
  
  <p>i ll have </p>
  
  <pre><code>{"0":"a","2":"b","3":"c","4":"d"}
  </code></pre>
  
  <p>but i dont need array keys to be encoded, i need an encoded array without empty elements and without array keys, how to solve?</p>
  
  <p>Php sandbox example: <a href="http://sandbox.onlinephpfunctions.com/code/91635a5df7fcd954dd64fe92089f2beadc81c3c4" rel="nofollow">http://sandbox.onlinephpfunctions.com/code/91635a5df7fcd954dd64fe92089f2beadc81c3c4</a></p>