parse_strPHP ManualPrevNextparse_strparse_str -- Parses the string into variables.Descriptionvoid parse_str(string str);
Parses str as if it were the query string
passed via an URL and sets variables in the current scope.
Example 1. Using parse_str() 1
2 $str = "first=value&second[]=this+works&second[]=another";
3 parse_str($str);
4 echo $first; /* prints "value" */
5 echo $second[0]; /* prints "this works" */
6 echo $second[1]; /* prints "another" */
7
PrevHomeNextOrdUpprint
Wyszukiwarka