title: php arrays: how to print only array values but not keys
body: <p>This code loops through a mysql table and prints out empty/null fields. It however prints the array values and the keys like this </p>
  
  <pre><code>Array ( 
      [0] =&gt; Field "dob" on entry "1" is empty/null 
      [1] =&gt; Field "user_name" on entry "7" is empty/null
  )
  </code></pre>
  
  <p>How do I print something like this <code>field "dob" on entry "1" is empty/null</code></p>
  
  <pre><code>$sql = "SELECT * FROM userinfo";
  $res = mysql_query($sql);
  while ($row = mysql_fetch_array($res)) {
      foreach($row as $key =&gt; $field) {
          if(empty($field)) {
              $emptyFields[] = sprintf('Field "%s" on entry "%d" is empty/null', $key,   $row['userid']);
           }
       }
  }
  print_r($emptyFields);
  </code></pre>