title: Replacing empty string with nulls in array php
body: <p>I'm sorry but i researched a lot about this issue.
  Is there a standard function to search and replace array elements?</p>
  
  <p>str_replace doesn't work in this case, because what i wanna search for is an empty string '' and i wanna replace them with NULL values</p>
  
  <p>this is my array:</p>
  
  <pre><code>$array = (
      'first' =&gt; '',
      'second' =&gt; '',
  );
  </code></pre>
  
  <p>and i want it to become:</p>
  
  <pre><code>$array = (
      'first' =&gt; NULL,
      'second' =&gt; NULL,
  );
  </code></pre>
  
  <p>Of course i can create a function to do that, I wanna know if there is one standard function to do that, or at least a "single-line solution".</p>