PHP echo html skills
PHP echo html skills is very simple, since it is used PHP echo structure, then in addition to mere echo html, you can also echo the PHP 's variable value, basic PHP dynamic web design, often use to The skills of PHP echo html are more advanced and start to be prototyped. It is relatively rare to directly use echo html processing methods. This article focuses on basic PHP echo html skills, so that readers and friends before learning advanced prototype design , Can quickly get started with basic PHP design.
PHP echo html implementation example 1. Basic HTML tags
echo'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; //Web page encoding declaration
echo'here is a string<br>';
echo ' <a href="#">Here is a hyperlink</a><br>';
echo'<b>Here is bold text</b><br>';
echo "<input type='text' value ='Text input field'><br>";
echo "<input type='button' value='This is a button'>";
?>
here is the hyperlink,
here is the bold text
PHP echo html implementation example 2: Output variable number string through string concatenation operator
echo'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; //Web page encoding declaration
$string1='<b>';
$string2=' </b>';
$string3='Here is bold font';
$string4='Here is normal font';
echo $string4.$string1.$string3.$string2.$string4;
?>
Post a Comment
0 Comments