06 February 2017

Write HTML in PHP

php logo

With print command , you can output HTML code inside php.

Sample code :


print("<b>This is Bolded</b>");


To use quotes inside print command , use \"  inside code.


print("<a href=\"http://www.google.com\">Visit Google</a>");


With echo , html output can be done inside php.


echo "<h1>This is HTML code inside echo syntax inside php</h1>";

You need to practice and test and solve the problems you face.

Learn: How to write php inside HTML code

(If you found this article useful then share with your friends.)

No comments: