wsantos Posted July 20, 2007 Share Posted July 20, 2007 Guys, i have correct data in my array but could not output it in html...here's the display code: for($row=0;$row<count($GCode);$row++) { ?> <TR> <TD><?php echo $GCode[$row]; ?></TD> <TD><?php echo $GCodeList[$GCode[$row]][0]; ?></TD> <TD><?php echo $GCodeList[$GCode[$row]][1]; ?></TD> <TD><?php echo $GCodeList[$GCode[$row]][2]; ?></TD> <TD><?php echo $GCodeList[$GCode[$row]][3]; ?></TD> </TR> <?php tried to put some echo command right just before the for loop and i got an output. Did i lost the value within the arrays when i used php close tag? Quote Link to comment https://forums.phpfreaks.com/topic/61013-php-html-problem/ Share on other sites More sharing options...
Azu Posted July 20, 2007 Share Posted July 20, 2007 Hi, try using print_r($GCodeList); And see if it outputs the right stuff. If it's not, then your array isn't being populated right. Quote Link to comment https://forums.phpfreaks.com/topic/61013-php-html-problem/#findComment-303598 Share on other sites More sharing options...
wsantos Posted July 20, 2007 Author Share Posted July 20, 2007 yup the output is right in fact here is output <TR> <TD>G3091</TD> <TD>57</TD> <TD>1</TD> <TD>25</TD> <TD>31</TD> </TR> <TR> <TD>G7200</TD> <TD>443</TD> <TD>26</TD> <TD>197</TD> <TD>220</TD> </TR> <TR> <TD>G7205</TD> <TD>80</TD> <TD>2</TD> <TD>40</TD> <TD>38</TD> </TR> <TR> <TD>G7470</TD> <TD>47</TD> <TD>3</TD> <TD>22</TD> <TD>22</TD> </TR> <TR> <TD>G7202</TD> <TD>56</TD> <TD>0</TD> <TD>31</TD> <TD>25</TD> </TR> <TR> <TD>G5031</TD> <TD>23</TD> <TD>1</TD> <TD>12</TD> <TD>10</TD> </TR> <TR> <TD>G7203</TD> <TD>78</TD> <TD>6</TD> <TD>33</TD> <TD>39</TD> </TR> <TR> <TD>G1292</TD> <TD>35</TD> <TD>1</TD> <TD>18</TD> <TD>16</TD> </TR> <TR> <TD>G5752</TD> <TD>16</TD> <TD>0</TD> <TD>6</TD> <TD>10</TD> </TR> <TR> <TD>G7201</TD> <TD>57</TD> <TD>2</TD> <TD>30</TD> <TD>25</TD> </TR> <TR> <TD>G7206</TD> <TD>63</TD> <TD>3</TD> <TD>26</TD> <TD>34</TD> </TR> <TR> <TD>G8348</TD> <TD>5</TD> <TD>0</TD> <TD>2</TD> <TD>3</TD> </TR> <TR> <TD>G1207</TD> <TD>31</TD> <TD>2</TD> <TD>15</TD> <TD>14</TD> </TR> <TR> <TD>G3360</TD> <TD>12</TD> <TD>0</TD> <TD>7</TD> <TD>5</TD> </TR> <TR> <TD>G1539</TD> <TD>29</TD> <TD>3</TD> <TD>19</TD> <TD>7</TD> </TR> <TR> <TD>G7204</TD> <TD>63</TD> <TD>1</TD> <TD>39</TD> <TD>23</TD> </TR> <TR> <TD>G1563</TD> <TD>59</TD> <TD>2</TD> <TD>23</TD> <TD>34</TD> </TR> <TR> <TD>G7578</TD> <TD>17</TD> <TD>0</TD> <TD>10</TD> <TD>7</TD> </TR> <TR> <TD>G6333</TD> <TD>4</TD> <TD>0</TD> <TD>2</TD> <TD>2</TD> </TR> <TR> <TD>G1181</TD> <TD>7</TD> <TD>0</TD> <TD>5</TD> <TD>2</TD> </TR> <TR> <TD>G8526</TD> <TD>8</TD> <TD>0</TD> <TD>4</TD> <TD>4</TD> </TR> <TR> <TD>G1745</TD> <TD>6</TD> <TD>0</TD> <TD>3</TD> <TD>3</TD> </TR> <TR> <TD>G3637</TD> <TD>4</TD> <TD>0</TD> <TD>1</TD> <TD>3</TD> </TR> <TR> <TD>G1629</TD> <TD>8</TD> <TD>1</TD> <TD>4</TD> <TD>3</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> Quote Link to comment https://forums.phpfreaks.com/topic/61013-php-html-problem/#findComment-303601 Share on other sites More sharing options...
Azu Posted July 20, 2007 Share Posted July 20, 2007 Okay.. what exactly is the problem then o_o? Quote Link to comment https://forums.phpfreaks.com/topic/61013-php-html-problem/#findComment-303611 Share on other sites More sharing options...
wsantos Posted July 20, 2007 Author Share Posted July 20, 2007 just couldn't put it out in html... . i checked the array before and after the loop so i know that i didn't lost the value...i don't know what's the prob. Quote Link to comment https://forums.phpfreaks.com/topic/61013-php-html-problem/#findComment-303646 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.