HTML_inside_PHP
You have to check for double quotation marks.Using the ECHO statement may involve the use of double quotation marks because HTML also uses double quotation marks,you can do one of two things to avoid problems:
Escape your HTML double quotation marks with a backslash,as in the following:
Use single quotation marks around your html.This can help improve the readability of your code if you have many quotes:
Remember that you have still to follow's rules:Follow the PHP guidelines and end your sentences with a semicolon,as well as close all quotes.
Don't try cram too much HTML into your PHP:
EXAMPLE:
Php was really needed for was to provided the value represented by $_POST['fname'] and display it on the screen.The rest of the related code was just to output HTML.In this case ,You're better off just staying in HTML and pulling out the PHP line when you need it.
Escape your HTML double quotation marks with a backslash,as in the following:
echo'<p style=\"font-size:80%;\">"; |
Use single quotation marks around your html.This can help improve the readability of your code if you have many quotes:
echo'<p style="font-size:80%;">'; |
Remember that you have still to follow's rules:Follow the PHP guidelines and end your sentences with a semicolon,as well as close all quotes.
Don't try cram too much HTML into your PHP:
EXAMPLE:
<?Php echo'<table style="font-family:Arial,sans-serif;font-size:80%;'; echo'width:100%">'; echo'<tr>'; echo'<td style="width:50%;">'; echo'First Name:'; echo'</td>'; echo'<td style="width:50%">'; echo $_POST['fname']; echo'</td>'; echo'</tr>'; echo'</table>'; ?> |
Php was really needed for was to provided the value represented by $_POST['fname'] and display it on the screen.The rest of the related code was just to output HTML.In this case ,You're better off just staying in HTML and pulling out the PHP line when you need it.
HTML_inside_PHP
Reviewed by Unknown
on
4:42 PM
Rating:
Post a Comment