PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
LonelyProgrammer
Forum Contributor
Posts: 108 Joined: Sun Oct 12, 2003 7:10 am
Post
by LonelyProgrammer » Sat Jan 10, 2004 11:09 pm
Is there any way to convert the $_GET array back into its original query string?
Nay
Forum Regular
Posts: 951 Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia
Post
by Nay » Sat Jan 10, 2004 11:56 pm
Maybe:
is what you're looking for.
-Nay
LonelyProgrammer
Forum Contributor
Posts: 108 Joined: Sun Oct 12, 2003 7:10 am
Post
by LonelyProgrammer » Sun Jan 11, 2004 1:10 am
*smack forehead for forgetting to check documentation*
But what if I want the string passed using the $_POST method?
Nay
Forum Regular
Posts: 951 Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia
Post
by Nay » Sun Jan 11, 2004 1:40 am
Code: Select all
<?php
$string = '';
foreach($_POST as $key => $value) {
if(empty($string)) {
$string .= $key . "=" . $value;
} else {
$string .= "&" . $key . "=" . $value
}
}
?>
I'm not sure if there's any other way though.
-Nay