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. Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/ 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 Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-215809 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? Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-215813 Share on other sites More sharing options...
Eugene Posted March 27, 2007 Author Share Posted March 27, 2007 bump Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-216339 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. Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-216341 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. Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-216344 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. Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-216353 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. Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-216356 Share on other sites More sharing options...
Eugene Posted March 27, 2007 Author Share Posted March 27, 2007 Fixed it. Link to comment https://forums.phpfreaks.com/topic/44435-really-weird-problem/#findComment-216362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.