diff options
-rw-r--r-- | README.markdown | 2 | ||||
-rw-r--r-- | ocaml.html.markdown | 6 | ||||
-rw-r--r-- | php.html.markdown | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/README.markdown b/README.markdown index 774797d5..94afbcbe 100644 --- a/README.markdown +++ b/README.markdown @@ -18,7 +18,7 @@ All contributions are welcome, from the tiniest typo to a brand new article. Tra in all languages are welcome (or, for that matter, original articles in any language). Send a pull request or open an issue any time of day or night. -**Please tag your issues pull requests with [language/lang-code] at the beginning** +**Please tag your issues and pull requests with [language/lang-code] at the beginning** **(e.g. [python/en] for English Python).** This will help everyone pick out things they care about. diff --git a/ocaml.html.markdown b/ocaml.html.markdown index 02435e4d..8faab297 100644 --- a/ocaml.html.markdown +++ b/ocaml.html.markdown @@ -196,7 +196,7 @@ let (~/) x = 1.0 /. x ;; ~/4.0 (* = 0.25 *) -(*** Built-in datastructures ***) +(*** Built-in data structures ***) (* Lists are enclosed in square brackets, items are separated by semicolons. *) @@ -341,10 +341,10 @@ let say x = say (Cat "Fluffy") ;; (* "Fluffy says meow". *) -(** Traversing datastructures with pattern matching **) +(** Traversing data structures with pattern matching **) (* Recursive types can be traversed with pattern matching easily. - Let's see how we can traverse a datastructure of the built-in list type. + Let's see how we can traverse a data structure of the built-in list type. Even though the built-in cons ("::") looks like an infix operator, it's actually a type constructor and can be matched like any other. *) let rec sum_list l = 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]); |