SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Toronto, Ontario
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation ucfirst() not working?

    Hey guys,

    I am pulling some information from a DB, the only problem is it's all UPPERCASE.

    Code:
    echo '<li><img src="images/red_arrow.gif" width="15" height="9" border="0" alt="" /><a href="http://resourcebubble.com/stock.php?stock=',$row['symbol'],'.l&submit.x=0&submit.y=0&submit=submit" class="tooltip" title="',$row['symbol'],'">',ucfirst($row['company']),'</a></li>';
    I am trying to apply ucfirst() to $row['company'] but for some reason it isn't working.

    Can anybody help me figure out how im using this code wrong?

    Thanks,
    Mario
    $ Available For Hire
    Need a website designed or coded? Then feel free to contact me!

    PSP Backgrounds - PSPBG.net || Photoshop Brushes - PSBrushes.net

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    ucfirst( strtolower( $var ) )
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,403
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    I pressume $row['company'] is not already all in uppercase.

  4. #4
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Toronto, Ontario
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    ucfirst( strtolower( $var ) )
    Thanks! worked just fine.
    $ Available For Hire
    Need a website designed or coded? Then feel free to contact me!

    PSP Backgrounds - PSPBG.net || Photoshop Brushes - PSBrushes.net


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
  •