Thread: substr ????????

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    32
    Rep Power
    14
    What's wrong with:
    $line = substr($line, 3);


    for some reason when i output $line
    after that, it hasn't deleted
    the first 3 characters

    Simp
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Noramally it should work..

    <?
    $line="oh,My LORD!!";
    $line = substr ($line, 3);// returns "My LORD!!"

    echo $line;
    ?>

    just try to assain the return value to another variable and see how it works.

    $var = substr ($line, 3);





    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. passsing data and substr...
    By apek in forum PHP Development
    Replies: 1
    Last Post: January 11th, 2004, 01:24 AM
  2. can I do substr in the middle of foreach
    By kahnjure in forum PHP Development
    Replies: 8
    Last Post: August 26th, 2003, 08:16 AM
  3. substr() return not interpolating into s///
    By Ctb in forum Perl Programming
    Replies: 1
    Last Post: September 9th, 2002, 02:58 PM
  4. Replies: 3
    Last Post: March 6th, 2002, 12:25 PM
  5. substr
    By Acid Reign in forum Perl Programming
    Replies: 4
    Last Post: August 9th, 2001, 09:19 AM

IMN logo majestic logo threadwatch logo seochat tools logo