1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP to reverse a string

Discussion in 'PHP & Perl' started by cber12, Feb 26, 2009.

  1. cber12

    cber12 Newbie

    Joined:
    Nov 9, 2008
    Messages:
    20
    Likes Received:
    5
    Simple I am sure but cannot figure it out.

    How do I get PHP to reverse a string.

    Say

    abcdefg

    to

    gfedcba


    Any ideas?
     
  2. oldenstylehats

    oldenstylehats Elite Member Premium Member

    Joined:
    Apr 10, 2008
    Messages:
    1,893
    Likes Received:
    1,196
    http://us2.php.net/strrev
     
    • Thanks Thanks x 1
  3. cber12

    cber12 Newbie

    Joined:
    Nov 9, 2008
    Messages:
    20
    Likes Received:
    5
    Thanks. I knew there was a function! I feel silly now.