mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-26 09:21:00 +03:00
Update php.html.markdown
a few sentences to constants
This commit is contained in:
parent
8ffd02feff
commit
a46ae22bf7
@ -99,6 +99,21 @@ END;
|
|||||||
echo 'This string ' . 'is concatenated';
|
echo 'This string ' . 'is concatenated';
|
||||||
|
|
||||||
|
|
||||||
|
/********************************
|
||||||
|
* Constants
|
||||||
|
*/
|
||||||
|
|
||||||
|
// A constant is defined by using define()
|
||||||
|
// and can never be changed during runtime!
|
||||||
|
|
||||||
|
// a valid constant name starts with a letter or underscore,
|
||||||
|
// followed by any number of letters, numbers, or underscores.
|
||||||
|
define("FOO", "something");
|
||||||
|
|
||||||
|
// access to a constant is possible by direct using the choosen name
|
||||||
|
echo 'This outputs '.FOO;
|
||||||
|
|
||||||
|
|
||||||
/********************************
|
/********************************
|
||||||
* Arrays
|
* Arrays
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user