strtok()
Posted: Mon May 30, 2005 11:50 pm
hi, i cant get strtok() to work
someone helps? thanks
output is...
temp = a@b@c
tok is a
tok is b
tok is c
but i wanted a b c d e f g h i // each chars on a new line
Code: Select all
$str = "e;a@b@c#d@e@f#g@h@i"e;;
$temp = strtok($str,"e;#"e;);
while($temp) {
echo "e;temp = "e;.$temp."e;<br>"e;;
$tok = $temp;
$tok = strtok($tok,"e;@"e;);
while($tok) {
echo "e;tok is "e;.$tok."e;<br>"e;;
$tok = strtok("e;@"e;);
}
$temp = strtok("e;#"e;);
}temp = a@b@c
tok is a
tok is b
tok is c
but i wanted a b c d e f g h i // each chars on a new line