PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
bruceg
Forum Contributor
Posts: 174 Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:
Post
by bruceg » Tue Apr 04, 2006 10:42 am
I need to escape the class="home" for in the CSS declaration in between my PHP code as listed below.
Code: Select all
else {
$visit_count=$_SESSION['visit_count'] +1;
echo "<h3 class="home">Welcome Back! I see you have visited $visit_count times</h3>";
and can't remember how it's done. I thought it was <h3 class='"home"'>, but that doesn't work.
please assist
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Apr 04, 2006 10:43 am
backslashes.
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Tue Apr 04, 2006 10:43 am
Code: Select all
echo "<h3 class=\"home\">Welcome Back! I see you have visited $visit_count times</h3>";
or
Code: Select all
echo '<h3 class="home">Welcome Back! I see you have visited '.$visit_count times.'</h3>';
bruceg
Forum Contributor
Posts: 174 Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:
Post
by bruceg » Tue Apr 04, 2006 11:00 am
wonderful, thanks for the quick responses!