steve m Posted March 10, 2006 Share Posted March 10, 2006 Hi there,Can anyone tell me how when I’m in php, and I want to echo text but there are quotes in the text? For example, "Jill went up the hill". This is in a variable, but when I type the quotes in there they don't show up or the text is displayed funky. What is the code or characters to type to get the quotes to show up in the text? Quote Link to comment Share on other sites More sharing options...
lessthanthree Posted March 10, 2006 Share Posted March 10, 2006 print "\"Jack and Jill went up the hill\"";You need to escape the "'s you want to print with \Alternatively you could useprint '"Jack and Jill went up the hill"'; (that's single quotes with double quotes inside) Quote Link to comment Share on other sites More sharing options...
steve m Posted March 10, 2006 Author Share Posted March 10, 2006 Cool, thanks a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.