PHP development practice authoritative guide, php Practice Guide
3.2.1 variable declaration and naming
1 <? Php 2 $ title = "hello"; // correct 3 $ title123 = "hello"; // correct 4 $123 title = "hello "; // error 5 $ _ title = "hello"; // correct 6 $ @ # title = "hello"; // error 7 $ url = "hello "; // get the variable url 8 echo $ url; // result: hello 9 unset ($ url); // Delete the variable url10 echo $ url; // The result is null 11?>
3.2.2 variable and Reference Assignment
1 <? Php2 $ var = "php"; 3 $ php = "hello"; 4 echo $ var; // output result php5 echo $ var; // output result hello6?>
3.3.1 string
1 <? Php2 $ title = "hello"; 3 echo '$ title, world'; // result: $ title, world4 echo "$ title, world"; // result: hello, world5 echo "$ {title}, world"; // result: hello, world6 echo "{$ title}, world"; // result: hello, world7 echo "\ $ title, world"; // result: $ title, world8?>
3.3.8 type forced conversion and Application
// Convert other types to integer type <? Php $ php = 100.10; echo (int) $ php; // output result: 100 $ php = true; echo (int) $ php; // output result: 1 $ php = "123php"; echo (int) $ php; // output result: 123 $ php = "php123"; echo (int) $ php; // output result: 0?> // Convert other types to string type <? Php $ php = 100.1; var_dump (string) $ php); // output result: string (4) "100.1" $ php = true; echo (string) $ php; // output result: 1?> // Convert other types to floating point type <? Php $ php = "123.2php"; var_dump (float) $ php); // output result: float (123.2) $ php = "php123.2"; var_dump (float) $ php); // output result: (0)?> // Convert other types to boolean <? Php $ php = "php"; var_dump (bool) $ php); // output result: bool (true) $ php = 0; var_dump (bool) $ php ); // output result: bool (false)?>
If you want to learn how to create a web page in PHP, do you have any examples that are associated with the web page setting background program?
Php and mysql web development
<Php development practice authoritative guide
However, you need html javascript or jquery at the front-end.
If you want to learn how to create a web page in PHP, do you have any examples that are associated with the web page setting background program?
Php and mysql web development
<Php development practice authoritative guide
However, you need html javascript or jquery at the front-end.