<?php

$weather = file_get_contents('https://api.wunderground.com/api/db51dd023689a25a/conditions/q/33,-117.json');
echo '<pre>';
//var_dump(json_decode($weather));
echo '</pre>';
echo $weather['response'];
$movies = array(
  array(
    "title" => "Rear Window",
    "director" => "Alfred Hitchcock",
    "year" => 1954
  ),
  array(
    "title" => "Full Metal Jacket",
    "director" => "Stanley Kubrick",
    "year" => 1987
  ),
  array(
    "title" => "Mean Streets",
    "director" => "Martin Scorsese",
    "year" => 1973
  ),
    array(
    "title" => "Tim and Eric",
    "director" => "Eric Wareheim",
    "year" => 2018
  )
);

for ($i=0;$i<count($movies);$i++){
    //we need to foreach around these
    foreach ($movies[$i] as $key =>$value){
        echo '<b>'.ucwords($key).'</b>:  '.$value.'<br>';
    }
   echo '<br>';
    
}

$shop = array(array(array("rose", 1.25, 15),
                    array("daisy", 0.75, 25),
                    array("orchid", 1.15, 7) 
                   ),
              array(array("rose", 1.25, 15),
                    array("daisy", 0.75, 25),
                    array("orchid", 1.15, 7) 
                   ),
              array(array("rose", 1.25, 15),
                    array("daisy", 0.75, 25),
                    array("orchid", 1.15, 7) 
                   )
             );


for ($i=0;$i<count($shop);$i++){
 for ($j=0;$j<count($shop[$i]);$j++){
     for ($k=0;$k<count($shop[$i][$j]);$k++){
        echo $shop[$i][$j][$k].'<br>';
}  
}  
}


$baseball = array("Kris Secor"=>array(1,2,array("Frank"=>"Michigan State")));
echo '<pre>';
print_r($baseball);
echo '</pre>';

echo $baseball["Kris Secor"][2]["Frank"];
foreach ($baseball as $key=>$value){
    echo $key.' <br>';
      for ($i=0;$i<count($value);$i++){
          echo $value[$i].'<br>';
      }
}
?>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>































