Eugene Posted March 27, 2007 Share Posted March 27, 2007 I have the following code at the top of the index page. <?PHP @header("Content-Type: text/html;charset=UTF-8;"); print_r($_GET); ?> The get variables are "page" and "option" let's say. Everytime i got to the page, i get: Array ( => article [option] => edit ) Array ( => article [option] => edit ) Array ( => article [option] => edit ) I'm as stumped as you get, any help will be appreciated greatly. Thanks. Quote Link to comment Share on other sites More sharing options...
fert Posted March 27, 2007 Share Posted March 27, 2007 I would suggest you read about print_r Quote Link to comment Share on other sites More sharing options...
Eugene Posted March 27, 2007 Author Share Posted March 27, 2007 I would suggest you read about print_r Yes, thank you for that insite Mr. Obvious, how about telling me why it does it 3 times in a row, instead of once? Quote Link to comment Share on other sites More sharing options...
Eugene Posted March 27, 2007 Author Share Posted March 27, 2007 bump Quote Link to comment Share on other sites More sharing options...
per1os Posted March 27, 2007 Share Posted March 27, 2007 Can you post the whole code? It seems like you are printing them out else where. Quote Link to comment Share on other sites More sharing options...
Eugene Posted March 27, 2007 Author Share Posted March 27, 2007 Can you post the whole code? It seems like you are printing them out else where. If I comment out that print_r, nothing appears then. Quote Link to comment Share on other sites More sharing options...
per1os Posted March 27, 2007 Share Posted March 27, 2007 What happens when you foreach through $_GET...try this foreach ($_GET as $key=>$val) print $key . " " . $val . "<br />"; If it only goes through the array once like it should than chances are the print_r function is doing something funky that is probably a server-specific problem. Quote Link to comment Share on other sites More sharing options...
papaface Posted March 27, 2007 Share Posted March 27, 2007 Can you show us an example of the url you are trying to make sure you are coding it correctly. Quote Link to comment Share on other sites More sharing options...
Eugene Posted March 27, 2007 Author Share Posted March 27, 2007 Fixed it. 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.