Just write a table and list it.
Write a code, huh?
<?PHP$str= "PHP @ Net dictionary @ ASP [email protected] JSP dictionary";$str _explode=Explode("@",$str);Echo"Supplemental exp () returns the X-square value of E". <br> ";Echo $str _explode." <br> ";Print_r($str _explode);$n=0; for($n;$n<4;$n++){Echo $str _explode[$n]." <br> ";}Echo"When$n value is too large, the error "." Is output. <br> ";?>
can run to see
Echo () |
ECHO is a PHP statement, print and Print_r are functions, the statement has no return value, and the function can have a return value (even if it is not used |
echo-Output one or more strings EX void Echo (String arg1 [, String ...])//return value is empty echo "Hellow". "World"; |
Print () |
Can only print out values for simple type variables (such as int,string) |
Print-Output a string EX int print (string arg)//return value for shaping print "Hello World"; |
Print_r () |
You can print out values for complex type variables (such as arrays, objects) |
Print_r-Print easy-to-understand information about variables. BOOL Print_r (mixed Expression_r [, BOOL Return])//Return value is Boolean, parameter is mix type, can be string, shape, array, object class Print_r () display easy-to-understand information about a variable. If a string, integer, or float is given, the variable value itself is printed. If an array is given, the keys and elements are displayed in a certain format. object is similar to an array. Print_r () Moves the pointer of the array to the last edge. You can Print_r (str); Print_r (int); Print_r (array); Print_r (obj); You can also use Var_dump Var_export |
The difference between echo print Print_r in PHP