hackypro Posted September 15, 2008 Share Posted September 15, 2008 ok so this php code here is what i have for processing a html page full of user input. the input is random and stored in arrays. however i'm not sure how to use the foreach method to scan arrays, and print the data within the table. as it is, each table cell just says array. also i need to figure out how to link back to the page in which the data was entered, which is also random. i think i need to use a $_SERVER command but i'm not sure which one and under what syntax. yes i'm a nerd. no i'm not a smart nerd. yes thats a terrible predicament to be in. whatever. if you can help i'd send you all my e-props. Link to comment https://forums.phpfreaks.com/topic/124247-help-iterating-through-arrays-and-hotlinking/ Share on other sites More sharing options...
chronister Posted September 15, 2008 Share Posted September 15, 2008 Anytime your dealing with arrays and you end up with ARRAY or array when you echo out something, then your dealing with multi-dimensional array, and you have to loop again inside the other loop. Here is a nifty piece of code to see what your array contains. <?php echo <pre>; print_r($ArrayName); echo </pre>'; ?> Just wondering why the request_method part. You should know how the form is submitted... right?? Nate Link to comment https://forums.phpfreaks.com/topic/124247-help-iterating-through-arrays-and-hotlinking/#findComment-641659 Share on other sites More sharing options...
hackypro Posted September 15, 2008 Author Share Posted September 15, 2008 no actually this is all for a sql class and the code needs to be written so that the source document is unknown. therefore it could either be sent by GET or POST. no offense but /\ that means that your read array commands don't really help me. i'm only supposed to display the name of the field and the user input entered, not knowing what the actual info is. i know i need to use a foreach method to read through the array, but i'm not sure how. also my hotlink issue is still unsolved....i dunno thanks for trying though Link to comment https://forums.phpfreaks.com/topic/124247-help-iterating-through-arrays-and-hotlinking/#findComment-641686 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.