Let us consider we get a value from a post actionone,two,three i.e: $ss = $_POST['arv'];
Now using the php method explode() we will convert the string in to a array object explode(seperator,string); i.e. $tok = explode(',',$ss);
so we have got a string array. Now we print the array using print_r() method.
This method prints the array in string format.
print_r($tok);
The result
Array
(
[0] => one
[1] => two
[2] => three
)
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.