nderitk Posted February 9, 2009 Share Posted February 9, 2009 Hello guys, just assist me with some code fragments simply illustrating how to capture data stored in Mysql databse in php arrays.The data can then be used to generate charts and graphs. Link to comment https://forums.phpfreaks.com/topic/144452-mysql-data-to-php-arrays/ Share on other sites More sharing options...
trq Posted February 9, 2009 Share Posted February 9, 2009 $arr = array(); $sql = "SELECT foo, bar FROM tbl" if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($row = mysql_fetch_assoc($result)) { $arr[] = $row; } } } Link to comment https://forums.phpfreaks.com/topic/144452-mysql-data-to-php-arrays/#findComment-757976 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.