Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

urldecode(3) [php man page]

URLDECODE(3)								 1							      URLDECODE(3)

urldecode - Decodes URL-encoded string

SYNOPSIS
string urldecode (string $str) DESCRIPTION
Decodes any % ## encoding in the given string. Plus symbols (' +') are decoded to a space character. PARAMETERS
o $str - The string to be decoded. RETURN VALUES
Returns the decoded string. EXAMPLES
Example #1 urldecode(3) example <?php $query = "my=apples&are=green+and+red"; foreach (explode('&', $query) as $chunk) { $param = explode("=", $chunk); if ($param) { printf("Value for parameter "%s" is "%s"<br/> ", urldecode($param[0]), urldecode($param[1])); } } ?> NOTES
Warning The superglobals $_GET and $_REQUEST are already decoded. Using urldecode(3) on an element in $_GET or $_REQUEST could have unex- pected and dangerous results. SEE ALSO
urlencode(3), rawurlencode(3), rawurldecode(3), RFC 3986. PHP Documentation Group URLDECODE(3)

Check Out this Related Man Page

PARSE_STR(3)								 1							      PARSE_STR(3)

parse_str - Parses the string into variables

SYNOPSIS
void parse_str (string $str, [array &$arr]) DESCRIPTION
Parses $str as if it were the query string passed via a URL and sets variables in the current scope. Note To get the current QUERY_STRING, you may use the variable $_SERVER['QUERY_STRING']. Also, you may want to read the section on vari- ables from external sources. Note The magic_quotes_gpc setting affects the output of this function, as parse_str(3) uses the same mechanism that PHP uses to populate the $_GET, $_POST, etc. variables. PARAMETERS
o $str - The input string. o $arr - If the second parameter $arr is present, variables are stored in this variable as array elements instead. RETURN VALUES
No value is returned. EXAMPLES
Example #1 Using parse_str(3) <?php $str = "first=value&arr[]=foo+bar&arr[]=baz"; parse_str($str); echo $first; // value echo $arr[0]; // foo bar echo $arr[1]; // baz parse_str($str, $output); echo $output['first']; // value echo $output['arr'][0]; // foo bar echo $output['arr'][1]; // baz ?> SEE ALSO
parse_url(3), pathinfo(3), http_build_query(3), get_magic_quotes_gpc(3), urldecode(3). PHP Documentation Group PARSE_STR(3)
Man Page

5 More Discussions You Might Find Interesting

1. Linux

PHP problem

Hi frnds I installed phpmyadmin for OTRS but when ever i tried to open the phpMyAdmin-2.6.2/index.php page i m getting the following error " urldecode the db name if (isset($lightm_db)) { // no longer urlencoded because of html entities in the db name // $db =... (8 Replies)
Discussion started by: naik_mit
8 Replies

2. Shell Programming and Scripting

arrange data tools

Which is the best command(s) to arrange data of a file? This is my example input file: Tom ------ apples: 5 oranges: 7 pears: 10 apples: 2 oranges: 8 Jack ------ apples: 3 pears: 10 Lucy ------ oranges: 1 pears: 8 peaches: 9 Tom ------ peaches: 1 Jack ------ (1 Reply)
Discussion started by: csecnarf
1 Replies

3. Shell Programming and Scripting

Extract a word from sentence

$SET_PARAMS='-param Run_Type_Parm=Month -param Portfolio_Parm="997" -param From_Date_Parm="2011-08-09"' Want to extract the value of "Portfolio_Parm" from $SET_PARAMS i.e in the above case "997" & assigned to new variable. The existence order of "Portfolio"Parm" can change, but the name... (2 Replies)
Discussion started by: SujeethP
2 Replies

4. Shell Programming and Scripting

Getting value from one file and assigning it to variables of another file.

Hi, I need to read two values,startdate and enddate from a param file and then write this value to another param file(global) under a specific workflow name.Here in global param file there is may workflow names, hence we need to check for the right one and then add the data below it. Any... (5 Replies)
Discussion started by: angel12345
5 Replies

5. War Stories

Unex

Has anyone worked on unix projects where they see unix mis-spelled as unex or unyx in the workplace? (6 Replies)
Discussion started by: Neo
6 Replies