Echo and quotes characters

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

Post Reply
millan
Forum Newbie
Posts: 3
Joined: Fri Jul 25, 2003 6:13 pm

Echo and quotes characters

Post by millan »

:?:

Hi,

I want to echo the following line:

<a href "test.php" onmouseover="displaystatus('test page');" onmouseout="displaystatus('not test page');">test</a>

When I use echo, I need to change double quote (") with single quote (') because echo use double quote. But then I have a problem with single quote characters.
It should be a part of function ,and alse could contain php string insted of some strings in that line (test page).
How should I write need quotes (double and single) with echo function?

Milan
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

Within double quotes use \" to show a double quote, likewise for '' within single quotes.
Post Reply