wsantos Posted July 23, 2007 Share Posted July 23, 2007 Hi this is inline with my previous topic... I have a data stored in an array. Want to display it in Internet Explorer...However,could not display it. Thanks. Link to comment https://forums.phpfreaks.com/topic/61372-solved-displaying-data-from-array/ Share on other sites More sharing options...
GingerRobot Posted July 23, 2007 Share Posted July 23, 2007 Well how do you want it displayed? To just show the contents use print_r: print_r($yourarray); Link to comment https://forums.phpfreaks.com/topic/61372-solved-displaying-data-from-array/#findComment-305430 Share on other sites More sharing options...
wsantos Posted July 23, 2007 Author Share Posted July 23, 2007 on html...i got display from telnet...i need it as a table in the html. I assure you that the data in the arrays are correct and the display in my telnet shows the correct format for html.here's my display portion... // Display foreach($GCodeList as $GCodeKey => $GCodeValue) { echo " <TR>\n"; echo " <TD>" . $GCodeKey . "</TD>\n"; foreach($GCodeValue as $value) { echo " <TD>" . $value . "</TD>\n"; } echo " </TR>\n"; } here is the output on my telnet <HTML> <BODY> <TABLE> <TR> <TD>G1181</TD> <TD>7</TD> <TD>0</TD> <TD>5</TD> <TD>2</TD> </TR> <TR> <TD>G3307</TD> <TD>1</TD> <TD>0</TD> <TD>1</TD> <TD>0</TD> </TR> <TR> <TD>GXXXX</TD> <TD>1</TD> <TD>0</TD> <TD>1</TD> <TD>0</TD> </TR> </TABLE> </BODY> </HTML> Link to comment https://forums.phpfreaks.com/topic/61372-solved-displaying-data-from-array/#findComment-305440 Share on other sites More sharing options...
obsidian Posted July 23, 2007 Share Posted July 23, 2007 So... what's the question now? The code you posted there seems solid. Link to comment https://forums.phpfreaks.com/topic/61372-solved-displaying-data-from-array/#findComment-305443 Share on other sites More sharing options...
trq Posted July 23, 2007 Share Posted July 23, 2007 So what exactly is the problem? Link to comment https://forums.phpfreaks.com/topic/61372-solved-displaying-data-from-array/#findComment-305444 Share on other sites More sharing options...
wsantos Posted July 23, 2007 Author Share Posted July 23, 2007 it doesn't show in the html... Link to comment https://forums.phpfreaks.com/topic/61372-solved-displaying-data-from-array/#findComment-305448 Share on other sites More sharing options...
wsantos Posted July 23, 2007 Author Share Posted July 23, 2007 sorry for the spam...i could put it in a table if anyone can help me even displaying even one element of a stored array to html...do you think this is a config problem? Thanks Link to comment https://forums.phpfreaks.com/topic/61372-solved-displaying-data-from-array/#findComment-305480 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.