String Case

Discussion in 'PHP' started by babaMBA, Jul 6, 2007.

  1. #1
    I add a text field in my admin panel for my admin panel user.

    In this test field user my enter " this is entry "

    I want to convert this string as " This Is Entry ", Means in sentence case.

    Kindly tell me , What function i can use.
     
    babaMBA, Jul 6, 2007 IP
  2. Greg Carnegie

    Greg Carnegie Peon

    Messages:
    385
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use ucfirst($msg).
     
    Greg Carnegie, Jul 6, 2007 IP
  3. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #3
    wrong, use ucwords($string)
     
    gibex, Jul 6, 2007 IP
    ansi likes this.
  4. babaMBA

    babaMBA Guest

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thx Friends ...........Thx both of u.

    "usfirst" convert only first alphabat of the sentance where as the "uswords" convert first alphabat of all words.
     
    babaMBA, Jul 6, 2007 IP