Today's Lesson: PHP 3-Day Foundation Consolidation video Tutorial "Yan 18"
1. The difference between single and double quotation marks
Single double quotes For example: Escape, variable resolution, speed $ A = ' \ \ \ \ \ t \$ ';/' and \ Escape all need to add \, the other is output echo $a; echo "<br/>"; $b = "\" \ \ \ t \$ ";///n/t Direct input echo $b; echo "<br/>"; $age = the variable in the 10;//double quotation mark can be parsed $c = "Puerto $age year old"; $d = ' Puerto $age year old '; Echo $c, ' <br/> '; Echo $d, ' <br/> '; echo "<br/>";//Speed comparison, single quotes do not need to parse the string has no variables, need to transfer less content, faster than double quotation marks, priority using single quotation marks
2. Common functions of strings
This article from "A Big big waste fish" blog, declined reprint!
Abandoned fish--how long does PHP take to get from getting started to giving up? 9