Create, Add To and Read an Array in PHP


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $MyArray = array();
  2.  
  3. do {
  4.  
  5. $MyArray[] = $row_rsMyRecordset['MyField'];
  6.  
  7. } while ($row_rsMyRecordset = mysql_fetch_assoc($rsMyRecordset));
  8.  
  9. print_r(array_values($MyArray));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.