diff --git a/language/types.xml b/language/types.xml index e5b0a70f28..310b70c2cb 100644 --- a/language/types.xml +++ b/language/types.xml @@ -1,5 +1,5 @@ - + Types @@ -1167,11 +1167,33 @@ $arr[] = value; with arrays, see the array-functions section. + + + The unset function allows unsetting keys of an + array. Be aware that the array will NOT be reindexed. + + + 'one', 2 => 'two', 3 => 'three' ); +unset( $a[2] ); +/* will produce an array that would have been defined as + $a = array( 1=>'one', 3=>'three'); + and NOT + $a = array( 1 => 'one', 2 => 'three'); +*/ +]]> + + + + + The foreach control structure exists specificly for arrays. It provides an easy way to traverse an array. + +