You can also make a function that just explodes the string into an array, and then access the appropriate array value.
$mystring = "This is my string to test";
$myarray = explode(" ",$mystring);
$mytoken = $myarray[2];
echo $mytoken;
Keep in mind that php is 0-based, rather than 1-based like mIRC. The first token is 0, the second is 1, etc.
-genius_at_work