how about ...

<?

$sentance = "Today is   a beautiful day. ";
$temp = preg_replace("/[^a-zA-Z]+/", " ", $sentance);
$temp = explode(' ', $temp);
$words = array_count_values($temp);

print_r($words);

Nope. The question was the position of the words, not how many times
they appear.
oops :(


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to