1. What is the execution of PHP embedded in HTML?
When the PHP function module is processing a PHP file, it only cares about the PHP code (using the code contained in the PHP tag), for non-PHP code, it will be output;
For example, right figure code:
PHP function Module When parsing this file, will be all the HTML code back to Apache, for the content of the PHP output, the results will be returned to Apache, the final result from Apache returned to the client, for the browser to parse;
Tip: 1) PHP can also return JS code, as a string back, and finally to the browser execution;
2) PHP only handles the code within the <?php?> tag; js, html, CSS are strings for PHP;
2. How does the variable in PHP pass the value?
There are two ways in which variables are passed in PHP:
1) Assignment Value:
2) Reference value:
The process of PHP embedding into HTML