Re: Escaping Characters in PHP

From: Date: Sun, 23 Dec 2001 20:59:45 +0000
Subject: Re: Escaping Characters in PHP
References: 1 2  Groups: php.install 
Request: Send a blank email to php-install+get-5377@lists.php.net to get a copy of this message
Katie, Using PHP-Nuke (and in a php store I can't show clips from) if I put the following code in <strong><big>·</big></strong> <a href=index.php>Home</a><br> <strong><big>·</big></strong> <a href=topics.php>Topics</a><br> <strong><big>·</big></strong> <a href=sections.php>Sections</a><br> <strong><big>·</big></strong> <a href=reviews.php>Reviews</a><br> <strong><big>·</big></strong> <a href=friend.php>Recommend Us</a><br> <strong><big>·</big></strong> <a href=user.php>Your Account</a><br> <strong><big>·</big></strong> <a href=submit.php>Submit News</a><br> <strong><big>·</big></strong> <a href=stats.php>Stats</a><br> <strong><big>·</big></strong> <a href=top.php>Top 10</a><br> It works. the stock code however was <strong><big>·</big></strong> <a href=\"index.php\">Home</a><br> <strong><big>·</big></strong> <a href=\"topics.php\">Topics</a><br> <strong><big>·</big></strong> <a href=\"sections.php\">Sections</a><br> <strong><big>·</big></strong> <a href=\"reviews.php\">Reviews</a><br> <strong><big>·</big></strong> <a href=\"friend.php\"Recommend Us</a><br> <strong><big>·</big></strong> <a href=\"user.php\">Your Account</a><br> <strong><big>·</big></strong> <a href=\"submit.php\">Submit News</a><br> <strong><big>·</big></strong> <a href=\"stats.php\">Stats</a><br> <strong><big>·</big></strong> <a href=\"top.php\">Top 10</a><br> Which is more inline with W3C standard html output. Through out the code the \ is used to escape single and double quotes. For contractions in titles etc. Consistantly it prints \" instead of " to the output. Did I set up something wrong? James On Sun, 23 Dec 2001 09:09:20 -0800 (PST) The_polymorph <The_Polymorph@rocketmail.com> wrote: > Hi James. > > I am using version 4.1.0 and I just typed the following test script > for you: > > <?php > > echo "Who's car is it?"; > > ?> > > It worked fine. Just make sure you are using double quotes and not > single ones. > > -Katie. > > --- James Sparenberg <james@opencountry.org> wrote: > > All, > > I'm trying to escape characters in my text files such as ' " * etc. > > I know that the standard is to type something like Who\'s car is it? > > and the output should be Who's car is it. Unfortunately what I get > > is Who\'s car is it exactly as typed into the string. If I then > > input Who's car is it? It will output Who\'s car is it? How do I > > correctly escape these characters. Or rather where in the config > > file did I blow it. > > > > > > James > > > > -- > > PHP Install Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-install-unsubscribe@lists.php.net > > For additional commands, e-mail: php-install-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > > ===== > > > __________________________________________________ > Do You Yahoo!? > Send your FREE holiday greetings online! > http://greetings.yahoo.com

« previous php.install (#5377) next »