PhP is also used in html. You put the HTML codes in but keep it as .php. To make a PHP form or anything else u use html in it. almost no matter what.
-Coolprogram
Lol he made no sense at all, Thanks for explaining this Shorty, it might be useful to n00bs who are starting PHP /HTML coding.
I knew this back from a while ago anyway (the hard way)
Also, isnt it possible if you use double quotes on the echo that you can use a single quote in the html tags? i.e
echo" <html> <body bgcolor='#000000'>";
something like that.
Also if you want or need to put in a double quote, but dont want to put it outside a php tag, then you can always put a back slash "\" infront of it i.e
You can also write some C code that generates the HTML you want, place that code in a variable in your PHP script, write a C interpretor in PHP that precesses that C code and emails the output to another server where it is served to the user. Just because something can be done doesn't mean it should
On two occasions I've actually fired programmers for doing what's described above; inserting HTML into CGI scripts when they had been told to insert PHP into HTML.
And yeah .PJ, you can use \" or ', just never " on it's own. It's not even needed to use quotes at all in most situations, only when there are gaps in the " and " content and I think when validating. I found this all out the hard way too.
When I first started coding/programming with php I went nuts for ages over a simple script that was returning a php error because I was echoing the code and using quotation marks. I guess in the end,you learn by making mistakes. (I'm amazed this simple topic has drawn so much commenting here )