Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

Re: [PHP3] LowerCase Converter From: Manuel Lemos (mlemos <email protected>)
Date: 03/31/99

Hello Ian,

On 30-Mar-99 13:15:35, you wrote:

>Hi. I have written a small script that is called using a form. The user
>inputs an artist name which then becomes a variable $artist. I then use that
>to search for a pre-defined Location which is then sent to the browser in a
>header. The only problem is that if someone inputs an artists name in mixed
>case it doesn't recognise it so I was wondering if there is a function in
>PHP that converts the input into lowercase? Please advise me of this
>function.

There is strtolower but I never rely on it for strings with non-ASCII
characters with accents and cedillas. The currently set locale many not be
appropriate. I have a code to handle those access either to map to lower
or upper case or even strip accents (like á becomes a and ç becomes c).

If you are only concerned with English names with only ASCII characters
strtolower is just fine.

>Also I want to in the end have two input boxes. One with $artist and one
>with $song. How do I recognise that the variable is either or?

PHP will set each variable with the respective input value.

Regards,
Manuel Lemos

E-mail: mlemos <email protected>
URL: http://www.e-na.net/the_author.html
PGP key: finger://mlemos <email protected>

--

-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>