<?php
$good =['name'=> 'prinsha','surname'=> 'jangam'];
$good['doggy'] = 'newjippu';
//echo $good['name'];
foreach($good as $key=>$item){
echo $key .' '.$item. "\n";
}
$array = [1, 2, 3,4, 5] ;
// Mulltidimensional array
$dogs = [
['breed' => 'Cocker Spaniel', 'name' => ' Jypsy', 'size' => [
'width'=> 5,
'height'=> 10]],
['breed' => 'german ', 'name' => ' Jypsy', 'size' => [
'width'=>5,
'height'=> 10]],
['breed' => 'Shiba Inu', 'name' => ' Kotetsu', 'size' => [
'width'=> 5,
'height'=> 10]],
['breed' => 'Unknown', 'name' => ' Sheru Bahadur', 'size' => [
'width'=>5,
'height'=> 10]],
];
print_r($dogs[0]);
// we can use this to represent record of any kind, for example student record, anything, even complex things
preferences:
39.59 ms | 402 KiB | 5 Q