Array

Array

am 31.01.2003 12:06:49 von Rui Miguel Palma

------=_NextPart_000_0069_01C2C918.DA027F30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

como posso adicionar valores a um array com dois campos
=C9 algo assim:
tenho n alunos para os quais vou =E1 base de dados buscar resultados e =
quero criar uma array com o id e o email de cada um, por forma a ir =
buscar da seguinte forma $aluno[0]["email"] e $aluno[0]["id"]??

Desde j=E1 os melhores cumprimentos:Rui Palma
____________________________________________________________ ______
Rui Palma
ICQ#: 171381429
Current ICQ status: =20
+ More ways to contact me=20
____________________________________________________________ ______

------=_NextPart_000_0069_01C2C918.DA027F30--

RE: Array

am 29.09.2006 17:45:03 von Richard.Hutchins

Use the strtolower function to reduce all letters to lower case.

Then use the stripos() function to find where the spaces are in the string
and use that position in the substr() function to parse out the individual
words in the string. From there you can put the chunks into an array or a
query or whatever you're going to do with them.

You can also consider using the str_word_count(mystring, 1) to obtain an
array containing the words in the string. Check out the function in the
documentation to see how it treats different string types though - the
results may not be what you need.

You can also use the above strategy to find the periods in the sentences and
either remove them or just exclude them from whatever it is you're going to
do with the results of your parsing.

Probably a few other ways to get the results you're looking for including a
couple pre-built functions or classes if you Google for them.

-----Original Message-----
From: Ron Piggott (PHP) [mailto:ron.php@actsministries.org]
Sent: Friday, September 29, 2006 11:21 AM
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