operator meaning
$ variable flag
& Variable pointer (before variable)
@ no error message displayed (before function)
-> method or attribute of the object
=> element value of the array
?: Ternary operators such as: (expr1 )? (Expr2) :( expr3); expr1 is true, execute 2, otherwise 3. Similar to I
Expression
$ B = $ A = 3; // assign 3 to the variable $ A, $ B
$ C = $ A ++; // assign the value 3 of $ A to $ C, and then $ a rack 1
$ D = ++ $ B; // Add the value of $ B to 1 to get 4, and then assign 4 to $ D;
Time
Date
<Form action = "<?PHP echo $ php_self;?> "Method = post>
<Input type = "text" name = "num1" value = "<? Echo ($ answer)?> ">
Webpage redirection in PHP
webpage redirection in PHP involves three methods:
1. Use header () redirection
header ("Location: $ URL");
exit;
?>
2. Use the embedded HTML identifier redirection
";
echo" location. href = '$ url' ";
echo" --> ";
?>