dude32 Posted February 21, 2007 Share Posted February 21, 2007 The topic pretty much says it all. Any input in the SIMPLEST terms possible would be greatly appreciated. Thanks Link to comment https://forums.phpfreaks.com/topic/39391-how-do-i-use-php-arrays-to-populate-an-html-table/ Share on other sites More sharing options...
tom100 Posted February 21, 2007 Share Posted February 21, 2007 Please further explain what you are trying to do. This is a very general question. Link to comment https://forums.phpfreaks.com/topic/39391-how-do-i-use-php-arrays-to-populate-an-html-table/#findComment-190009 Share on other sites More sharing options...
JBS103 Posted February 21, 2007 Share Posted February 21, 2007 There are so many ways to do this. Heres one very general one. <html> <table> <?php $arr = array("apple", "orange", "banana"); foreach ($arr as $key => $value) { echo "<tr> <td>Key:".$key."</td> <td>Value:".$value."</td> </tr>"; } ?> </table> </html> Will produce something along the lines of... Key: 0 Value: apple Key: 1 Value: orange Key: 2 Value: banana http://www.php.net/foreach Link to comment https://forums.phpfreaks.com/topic/39391-how-do-i-use-php-arrays-to-populate-an-html-table/#findComment-190010 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.