$string = "Contents of the string can be splitted by explode function.";
$splitted = explode(" ",$string);
$cnt = count($splitted);
$i=0;
while($cnt > $i)
{
echo "$splitted[$i]";
echo "\n";
$i++;
}
?>
PHP scripts and programs for Beginner to Master php programs, php ready to use scripts & functions, css tutorials, html, javascripts, ajax examples for Beginner to Master
Minggu, 13 September 2009
Split string with php explode function and print array
If it is needed to Split string in php and then use those splitted values for some processing in that case you can use this script which Splits string with php explode function and prints array.
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar