From e44970bf48a385f233d575a0ab00197f13b1070b Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Tue, 30 Jan 2007 09:06:51 +0000 Subject: [PATCH] Fix examples to print the output and fix output git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@228472 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-intersect-assoc.xml | 7 +++---- reference/array/functions/array-intersect-ukey.xml | 4 ++-- reference/array/functions/array-intersect.xml | 7 +++---- reference/array/functions/array-merge-recursive.xml | 7 +++---- reference/array/functions/array-push.xml | 7 ++----- reference/array/functions/array-unshift.xml | 8 +++----- reference/array/functions/compact.xml | 7 +++---- 7 files changed, 19 insertions(+), 28 deletions(-) diff --git a/reference/array/functions/array-intersect-assoc.xml b/reference/array/functions/array-intersect-assoc.xml index 4c9590a45b..1a8dc2456d 100644 --- a/reference/array/functions/array-intersect-assoc.xml +++ b/reference/array/functions/array-intersect-assoc.xml @@ -1,5 +1,5 @@ - + array_intersect_assoc @@ -28,12 +28,11 @@ $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $result_array = array_intersect_assoc($array1, $array2); +print_r($result_array); ?> ]]> - - $result_array will look like: - + &example.outputs; - + array_intersect_ukey @@ -56,7 +56,7 @@ array(2) { int(1) ["green"]=> int(3) -}) +} ]]> diff --git a/reference/array/functions/array-intersect.xml b/reference/array/functions/array-intersect.xml index 2cb8c74697..adc9f227b3 100644 --- a/reference/array/functions/array-intersect.xml +++ b/reference/array/functions/array-intersect.xml @@ -1,5 +1,5 @@ - + @@ -29,12 +29,11 @@ $array1 = array("a" => "green", "red", "blue"); $array2 = array("b" => "green", "yellow", "red"); $result = array_intersect($array1, $array2); +print_r($result); ?> ]]> - - This makes $result have - + &example.outputs; - + @@ -35,12 +35,11 @@ $ar1 = array("color" => array("favorite" => "red"), 5); $ar2 = array(10, "color" => array("favorite" => "green", "blue")); $result = array_merge_recursive($ar1, $ar2); +print_r($result); ?> ]]> - - The $result will be: - + &example.outputs; - + @@ -44,10 +44,7 @@ print_r($stack); ?> ]]> - - This example would result in $stack having - the following elements: - + &example.outputs; - + @@ -33,13 +33,11 @@ ]]> - - This would result in $queue having the - following elements: - + &example.ouputs; - + @@ -54,12 +54,11 @@ $event = "SIGGRAPH"; $location_vars = array("city", "state"); $result = compact("event", "nothing_here", $location_vars); +print_r($result); ?> ]]> - - After this, $result will be: - + &example.ouputs;