Title: RE: [PHP-DB] Array

This is hardly database related but nonetheless.

<?
$myString = "Check one two three four.  You did well to count to four.";
$myString = str_replace(".","",$myString);
$myString = strtolower($myString);

$myWords = explode(" ", $myString);

// do stuff here with your array
?>

How is that?

___________________
Shaun Riches
Computer Science Student
http://www.sh4un.co.uk



-----Original Message-----
From: Ron Piggott (PHP) [mailto:[EMAIL PROTECTED]]
Sent: Fri 29/09/2006 16:21
To: PHP DB
Subject: [PHP-DB] Array

If I have the sentences

Check one two three four.  You did well to count to four.

how do I put each word into an array (so there would be 12 components in
the array) as well as remove the period and make the C in Check and the
Y in You lower case

Ron



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

Reply via email to