|
|
Tutorials » Php »
|
Topic |
What is parse_str Function?
|
|
Explanation |
|
This function parses the string into variables.
Syntax:
parse_str(string,array)
In the above syntax "string" specifies the text to be parsed, "array" is an optional parameter
where one can specify the array to store the variables.
Example:
<?php
parse_str("id=1&company=HIOX%20INDIA",$arr);
print_r($arr);
?>
Result:
Array
{
[1] => 1
[company] => HIOX INDIA
}
In the above PHP example for parse_str function the string variables are displayed in an array with their values and keys.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|