PHP - Array 2 Dimension

<?php

     $car1[0][1]="Jeep Grand Cherokee";
     $car1[0][2]=2002;
     $car1[1][1]="Jeep Wrangler";
     $car1[1][2]=2002;
     $car1[2][1]="Jeep Liberty";
     $car1[2][2]=2003;
     $car1[3][1]="Jeep Cherokee Briarwood";
     $car1[3][2]=2003;

     for($x=0; $x<4;$x++)
     {
          for($i=1; $i<3;$i++)
          {
               echo $car1[$x][$i]."<br>";
          }
     }

?>

Reference : http://www.pctalknet.com/php/variables.php

Popular posts from this blog

SAP CPI - Loop Process Call with SuccessFactor (oData V2)

Setting IntelliJ IDEA to run Groovy Script

C# - BASE64 to Image