ucfirst() not working

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
i have a simple xml file and i use php5.1.2's dom xml to pull out an
element's value.

i then use use:

// $type value all in lower case.

$type = ucfirst($type);

which doesn't work.  prints out all in lower case.

$type = strtoupper($type);

works as expected - the output is all upper case.

is this a bug or expected behavior?  


Re: ucfirst() not working

Skeets wrote:
Quoted text here. Click to load it

$type might start with a white space character, try:

$type = ucfirst(trim($type));


Site Timeline