Results 1 to 10 of 10

Thread: uppercase to lowercase

  1. #1
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default uppercase to lowercase

    hi,
    is there php to automatically convert uppercase letters to lowercase?
    or detect... (i have variable $nick which i want to get only lowercased)
    Last edited by auriaks; 11-25-2009 at 04:13 PM.

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    PHP Code:
    $nick 'ALL IN UPPER CASE, ANNOYING CAPS LOCK';

    $lower strtolower($nick);

    echo 
    $lower

  3. The Following User Says Thank You to Schmoopy For This Useful Post:

    auriaks (11-25-2009)

  4. #3
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    Thanks for speedy answer

  5. #4
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    But not working

  6. #5
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    How do you mean? Link your code and I'll take a look.

  7. #6
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    $neck = $_POST['nick'];
    $nick = strtolower($neck);

    all the code is too long

  8. #7
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    What's it outputting?

    The code you've posted should work.

  9. #8
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    then i insert it into mysql, and it come with uppercase

  10. #9
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    I'll need to see more of the code, make sure you're not directly inserting just $_POST['nick'].

  11. #10
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    Yea my bad... Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •