EchoFool Posted June 21, 2009 Share Posted June 21, 2009 Is it possible to check if $_GET is set regardless of the bit after it ? In shorter words as long as a $_GET isset no matter what the ['name'] might be that follows? IS that possible if so how do you do it? I tried If(isset($_GET)){ but this doesn't work.. is there a wild card that can be used or something here? Link to comment https://forums.phpfreaks.com/topic/163069-solved-check-if-_get-is-set/ Share on other sites More sharing options...
.josh Posted June 21, 2009 Share Posted June 21, 2009 you can do if($_GET) {...} or if(count($_GET) > 0) {...} Link to comment https://forums.phpfreaks.com/topic/163069-solved-check-if-_get-is-set/#findComment-860435 Share on other sites More sharing options...
M.O.S. Studios Posted June 21, 2009 Share Posted June 21, 2009 i haven't tested this, but I'm sure it will work function getset{ $return=FLASE; foreach($_GET as $set) { $true .= $set; } if(!is_null($true)){$return=TRUE;} return $return; } if(getset()){....} Link to comment https://forums.phpfreaks.com/topic/163069-solved-check-if-_get-is-set/#findComment-860438 Share on other sites More sharing options...
EchoFool Posted June 21, 2009 Author Share Posted June 21, 2009 Thanks guys! Works a treat! Link to comment https://forums.phpfreaks.com/topic/163069-solved-check-if-_get-is-set/#findComment-860439 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.