explode fonksiyonu

Php'de string bir ifadeyi belirlenen karaktere göre nasıl parçalarız?

<?php
$myemail 
"dan@mysite.com";
$parts explode("@",$myemail);
print_r($parts); ?>


Array ( [0] => dan [1] => mysite.com )  


Php'de string bir ifadenin kaç kelimeden oluştuğunu nasıl bulabilirim?

<?php
$text 
"I wrote a really long piece of text but I got bored after a little while but this should still give you an example of what this does and how it works"; $words explode(" "$text);

$wordcount count($words);
echo 
"It seems to me that there are $wordcount words in this snippet of text";


?>  

It seems to me that there are 32 words in this snippet of text