Jump to content
xisto Community
Sign in to follow this  
leiaah

Problems With Apostrophes [ ' ] In Php

Recommended Posts

Yes I have another problem. I have a blog that I made with php and mysql. It's working just fine except for the text being displayed on the page. Everytime there's an apostrophe encountered, *something puts a slash before it. It's fine in the database only the page. Probably a problem with PHP. I hope you understand what I say.Here's a sample line displayed in my blog:-- It\'s Saturday but I\'m still in the office. -- [ See the \ before the apostrophes? ]

Share this post


Link to post
Share on other sites

check out the function called STRIPSLASHES($STR);

just put everything you output to your page into this function first and your slashes will be gone.

examaple:

$string="It\'s Saturday but I\'m still in the office.";$string=stripslashes($string);echo $string;

try that.

Share this post


Link to post
Share on other sites

check out the function called STRIPSLASHES($STR);

 

just put everything you output to your page into this function first and your slashes will be gone.

 

examaple:

 

$string="It\'s Saturday but I\'m still in the office.";$string=stripslashes($string);echo $string;

try that.

130865[/snapback]


Woohoo! It worked! Thanks a lot. There's this line in my code that says:

$string=stripslashes($string);
I just copy-paste code from an ebook that's why I don't know how to debug things. Haha! Thank you very much. You made me happy today! :o

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.