diff options
author | Adam Bard <github@adambard.com> | 2015-10-17 23:53:52 +0800 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2015-10-17 23:53:52 +0800 |
commit | 2172ef76f43eaa5fe399c0fd4ff9225ad097fabd (patch) | |
tree | 7dfaa28dee64e0cfe908d1728185cadf2749321f | |
parent | 3ea760a3749ec2a63d5d78730072c1c7cda769a1 (diff) | |
parent | b2f51952f024d2e38f02b2541c22dece09bc23d5 (diff) |
Merge pull request #1577 from AkshayKalose/patch-1
Update PHP with Additional Information
-rw-r--r-- | php.html.markdown | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/php.html.markdown b/php.html.markdown index 39ec5aef..5e7eba7f 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -12,7 +12,7 @@ This document describes PHP 5+. <?php // PHP code must be enclosed with <?php tags // If your php file only contains PHP code, it is best practice -// to omit the php closing tag. +// to omit the php closing tag to prevent accidental output. // Two forward slashes start a one-line comment. @@ -103,6 +103,8 @@ END; // String concatenation is done with . echo 'This string ' . 'is concatenated'; +// Strings can be passed in as parameters to echo +echo 'Multiple', 'Parameters', 'Valid'; /******************************** * Constants @@ -141,6 +143,8 @@ echo $array[0]; // => "One" // Add an element to the end of an array $array[] = 'Four'; +// or +array_push($array, 'Five'); // Remove element from array unset($array[3]); |