Re: strlower problem

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

 



Richard Heyes wrote:
Ed Curtis wrote:
I'm converting upper case characters in a string to lower case and am coming up with an empty string.

As I've done a million times before with other non-numerical strings.

$thisStr = "CL22";

$strLow = strtolower($thisStr);

echo $thisStr;

Why does $strLow come up empty?

Because you're echoing out the original (uppercase) string. Try:

echo $strLow;

//in my best yoda voice//

to quickly you answer before you think...

//back in the Milky Way...//

he should still see something.

the op should see the original string 'CL22'. Last time I looked strtolower() did not modify the input as a reference.

So   echo $thisStr; should result in the op seeing CL22

Unless there are other things happening that only the force knows about...

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux