title: PHP - set all empty or null in an array, to 0, without a foreach loop
body: <p>I'm working with a large array. We're displaying all fields of data in the array with a table. Some fields in the array are null because the user hasn't accumulated anything in that field. However, we wanted a zero for when they have such a result. Our solution was to display the value along with intval()</p>
  
  <p><code>intval(@$users[$user_id]['loggedin_time'])</code></p>
  
  <p>Which is fine, but it is ugly and inelegant. Is there a way, without a foreach loop, to set all values of '' in the array to be 0?</p>