I have a HTML code with a javascript tag in it and i want to insert that code in my index.php file but when i do my website cant be accessed anymore. It says something like Syntax error on line 2, unexpected<
How can i insert a HTML code inside a PHP file?Not really a master in programming so your help would be appreciated.
It most likely means that you forgot to wrap the output XHTML in quotes or something. It’s complaining about an error in syntax, so unless you can show us your code, we can’t help you find the error.
The only difference is that the pop up loads automatically instead of pressing the button to load. And when i inserted the code in the php file my website did not look the same as before…it was really messed up and i dont know why. Any ideas?
as the post 3 says, you don’t need any echo at all.
You can break out of php. And insert any html you wish. As if it were HTML file.
Can you insert HTML code into HTML file? Well where is no difference.