blueman378 Posted March 4, 2008 Share Posted March 4, 2008 hi guys, whats trhe correct way to load values from $_GET into a array? Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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 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.