RE: Array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: RE: 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:ron.php@xxxxxxxxxxxxxxxxxx]
Sent: Fri 29/09/2006 16:21
To: PHP DB
Subject: 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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux