wsantos Posted July 21, 2007 Share Posted July 21, 2007 It seems I got myself in the situation and could use some help 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 i already checked the value of the data before and after the for loop and got it correctly via linux.however on web browser this section is totally blank...thanks for the help Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 21, 2007 Share Posted July 21, 2007 Kind of hard to determine wihtout knowing the contents of $GCodeList and $GCode. Can you show the out put of: echo "<pre>"; print_r($GCodeList); print_r($GCode); echo "</pre)"; Also, your code assumes that the keys of $GCode are numeric, which they may be. Also, you can create a loop for the $GCodeList values as well. Try this; <?php 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"; } ?> Quote Link to comment Share on other sites More sharing options...
wsantos Posted July 22, 2007 Author Share Posted July 22, 2007 $GCodeList - key = > element1 element2 . . $GCode . . elementn $GCode - nkey => val stat1 stat2 . . . i can assure you that both arrays are properly populated. even my linux output is correct.which has the form <TABLE> <TR> <TD>value of gcode[0]</TD> <TD>value of gcodelist[gcode[0][0]</TD> <TD>value of gcodelist[gcode[0][1]</TD> <TD>value of gcodelist[gcode[0][n]</TD> </TR> <TR> <TD>value of gcode[1]</TD> <TD>value of gcodelist[gcode[1][0]</TD> <TD>value of gcodelist[gcode[1][1]</TD> <TD>value of gcodelist[gcode[1][n]</TD> </TR> <TR> <TD>value of gcode[x]</TD> <TD>value of gcodelist[gcode[x][0]</TD> <TD>value of gcodelist[gcode[x][1]</TD> <TD>value of gcodelist[gcode[x][n]</TD> </TR> </TABLE> to make things more complicated the logs doesn't register any error too... Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 22, 2007 Share Posted July 22, 2007 None of what you just posted is useful in determining the problem. Are you saying that $GCodeList has a key called 'key' and that the elements of the array are 'element1', 'element2', etc? Real data was what I was interested in. I'm not sure how to interpret your sample HTML output. Are you saying that the actual output has the actual text "gcodelist[gcode[x][0]"? Lastly, I have no idea what you mean by "my linux output is correct". Are you saying that it works correctly on a Linux server or the client is Linux? Quote Link to comment Share on other sites More sharing options...
wsantos Posted July 22, 2007 Author Share Posted July 22, 2007 runs under linux server run the client using telnet... sorry can't VPN to the server this weekend. so have to do this manually. by the way heres one row of the output <TR> <TD>GX192</TD> <TD>15</TD> <TD>SIP/10.20.63.4</TD> <TD>10</TD> </TR> GX192 is the key for GCodeList,GCode contains the GX192 as the first element and the rest as follows...the key for GCode is numeric. Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 22, 2007 Share Posted July 22, 2007 Ok, so you get output when running a browser on the server, but not through the internet! Well, then the problem is most likely that there is a problem with hitting that server over the internet and this may not be a PHP problem at all. Can you hit any pages on that server over the internet? I think I'm still a little confused over the exact problem here. Quote Link to comment Share on other sites More sharing options...
wsantos Posted July 23, 2007 Author Share Posted July 23, 2007 i am confused myself...your code works with the my desired output as well...ok i'll try to explain it a little better... 1...server = linux, remote 2...client # 1 = telnet with right output 3...clent # 2 = Internet Explorer output blank 4...client # 2 = when the output is just a single line and not the array ... the output is correct Quote Link to comment Share on other sites More sharing options...
wsantos Posted July 23, 2007 Author Share Posted July 23, 2007 ok i tried an array count test... again i get correct count from telnet however got 0 count from internet explorer...config error?... Quote Link to comment 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.