0

This simple test below generates weird sequence

<?php
$cellphones = array(
     'iphone5' => 500,
     'iphone6' => 700,
     'iphone7' => 900
);
echo 'All cellphones : ' . print_r($cellphones);

?>

The result I'm expecting to see is : All cellphone :

Array ( [iphone5] => 500 [iphone6] => 700 [iphone7] => 900 )

but instead I got this :

Array ( [iphone5] => 500 [iphone6] => 700 [iphone7] => 900 ) All cellphone : 1

The sequence of the echo has some problem? and I notice after the sentence of "All cellphone" there a value of 1 at the end.

Thanks

ben
  • 470
  • 3
  • 11
Lion Gordon
  • 87
  • 1
  • 6

0 Answers0