blueman378 Posted March 4, 2008 Share Posted March 4, 2008 hi guys, whats trhe correct way to load values from $_GET into a array? Link to comment https://forums.phpfreaks.com/topic/94238-to-tired-to-think-loading-_get-into-array/ Share on other sites More sharing options...
shocker-z Posted March 4, 2008 Share Posted March 4, 2008 It is an array, what are you wanting to get out of it? Regards Liam Link to comment https://forums.phpfreaks.com/topic/94238-to-tired-to-think-loading-_get-into-array/#findComment-482705 Share on other sites More sharing options...
blueman378 Posted March 4, 2008 Author Share Posted March 4, 2008 opps, basically so i can pull bits of information out easily rather than writing it as $number = $_GET["phone"]; $title = $_GET["title"]; $descr = $_GET["description"]; $finish = $_GET["finish"]; and i dont like using the whole $_GET["description"]; to pull the information id rather have a array called info that i can pull it out of Link to comment https://forums.phpfreaks.com/topic/94238-to-tired-to-think-loading-_get-into-array/#findComment-482710 Share on other sites More sharing options...
shocker-z Posted March 4, 2008 Share Posted March 4, 2008 foreach($_GET AS $key => $value) { ${$key} = $value; } Should do the job mate Liam Link to comment https://forums.phpfreaks.com/topic/94238-to-tired-to-think-loading-_get-into-array/#findComment-482712 Share on other sites More sharing options...
blueman378 Posted March 4, 2008 Author Share Posted March 4, 2008 cheers exactly what i was looking for Link to comment https://forums.phpfreaks.com/topic/94238-to-tired-to-think-loading-_get-into-array/#findComment-482716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.