summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-08-31 23:08:28 -0700
committerAdam Bard <github@adambard.com>2013-08-31 23:08:28 -0700
commit0c09f7512766696cb54e651cd9ad2a8c2a9a586a (patch)
tree6e507593ac6fa4f12a72a08a852f12cffaff10b6
parent4dd948ccd297290414eecc6038277e97750c5f5e (diff)
parentba17d5b9877f324fa633c1670c49e6a867ba5734 (diff)
Merge pull request #293 from afaqurk/phpDocumentationUpdate
PHP documentation update
-rw-r--r--php.html.markdown10
1 files changed, 9 insertions, 1 deletions
diff --git a/php.html.markdown b/php.html.markdown
index 1cc6d2c5..19f507ad 100644
--- a/php.html.markdown
+++ b/php.html.markdown
@@ -59,6 +59,9 @@ $float = 1.234;
$float = 1.2e3;
$float = 7E-10;
+// Delete variable
+unset($int1)
+
// Arithmetic
$sum = 1 + 1; // 2
$difference = 2 - 1; // 1
@@ -136,6 +139,11 @@ echo $associative['One']; // prints 1
$array = ['One', 'Two', 'Three'];
echo $array[0]; // => "One"
+// Add an element to the end of an array
+$array[] = 'Four';
+
+// Remove element from array
+unset($array[3]);
/********************************
* Output
@@ -177,7 +185,7 @@ echo $x; // => 2
echo $z; // => 0
// Dumps type and value of variable to stdout
-var_dumb($z); // prints int(0)
+var_dump($z); // prints int(0)
// Prints variable to stdout in human-readable format
print_r($array); // prints: Array ( [0] => One [1] => Two [2] => Three )