#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    3
    Rep Power
    0
    I'm still learning php and I've come to something that I think should be able to be done, but I can't seem to find it.
    when I put a story(text) in a variable I have to add the in front of every ".
    Is there any function that you can make a story(text) stay the same rather then change all the "s to "s ?
    Thanks

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

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    you can use addslashes() for escaping from "s or 's.so you don't have to put '' infront of every " or '.


    eg:

    $str="fdgfdg'fdgFDG";

    $str=addslashes($str);

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

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


    [This message has been edited by Shiju Rajan (edited June 09, 2000).]

Similar Threads

  1. Problems encoding text to utf8 or Unicode
    By pixial in forum PHP Development
    Replies: 8
    Last Post: May 19th, 2004, 09:56 AM
  2. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 05:42 PM
  3. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  4. float question
    By yeah-yeah in forum HTML Programming
    Replies: 10
    Last Post: January 15th, 2004, 03:59 PM
  5. Javascript scrollbar - stuck on last bit
    By NayMyoSan in forum JavaScript Development
    Replies: 0
    Last Post: January 3rd, 2004, 12:05 PM

IMN logo majestic logo threadwatch logo seochat tools logo