$string=welcome to java
$splitstring=explode(" ",$string);
echo $splitsting[0]; //this prints "welcome"
echo $splitsting[1]; //this prints "to"
echo $splitsting[2]; //this prints "java"
Friday, 19th December 2008