![php logo php logo](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2wST43rE7cZMwwne8tcqX0MY4Nit-V-7K8Jr4-6VCVc9CP2yBg37CW2rj13GzxJGXvMho7_0GTn5DnKEHSr2c9a3iZYLF0Dmh14ldSpVjXMqaB8OCoOBjKIRNX1-UwNgk_rIIo1FKMrk/s1600/php-logo.jpg)
For Example:
To print something inside php, we can use the fuction named echo which is predefined in php for printing.
For Example:
To use php variable value inside html tag: We have taken a variable with name 'year' and value is set as '2014'. And the value of the variable has been used inside input text box inside the 'value' attribute .
You have to be very careful when using php inside html. With little mistake, you may not get result.
Note: Make sure the file extension ends with .php , as php is scripting language, so it needs a server to execute the php code.
Learn: How to write HTML inside php
No comments:
Post a Comment