PHP print output string
PHP print can be used to output PHP strings. The usage is similar to echo . Strictly speaking, PHP print itself is not a PHP function, and its execution efficiency is slightly slower than echo . When the processing program is simple, the difference between the two is actually not big, PHP print output can use single quotes simple string, you can also use double quotes output variable value.
PHP print basic syntax
print( $string ); or print $string;
Because print is not a function, it is not necessary to wrap the variables in parentheses . Instead, you can directly output the variables , and you can output a single variable or a combination of multiple sets of variables at a time, only through single quotes (''), Double quotation marks ("") or string concatenation (.) can change many different results.
PHP print example
$NewString1 ='Welcome to Wibibi.';
$NewString2 ='Have a good day.';
print($NewString1).$NewString2.'<br>';
echo $NewString1.$NewString2;
?>
Welcome to Wibibi.Have a good day.
Post a Comment
0 Comments