hi, im using strripos but it works the other way around than what i'd thought.
im using it combined with substr and they actually work but not as i thought.
on the string "one two three" instead of chop it like "one"-"two"-"three" it does "one two"-"two"-"three".
heres the code
<?php
$s="one two three";
$t=substr_count($s," ");
$i=1;
while ($i<=$t+1){
$fp=strripos($s," ");
if ($fp<=0){$fp=strlen($s);}
$result[$i]=substr($s,0,$fp);
$s=strchr($s," ");
$s=trim($s);
$i++;}
print_r ($result);
?>
the reult is pretty similar than what i need, so the error should be a small one i think. thanks in advanced for the help.