I am new to php and i have a small question.
This is my array
$cars=array( "1234"=> array("Toyota","100","2","white"),
"2468"=> array("Mazda","1000","0","red"),
"4587"=> array("Mercedes","200","0","green")
);
$_SESSION['cars']=$cars;
the elements 1234, 2468 and 4587 are basically registration numbers of the cars and my task is to insert these registration number in a table.
if( isset($_SESSION['cars']))
{
foreach($_SESSION['cars'] as $key)
{?>
<tr><td><?php echo $key?></td></tr>
this is wht i did but it gives me an error saying Notice: Array to string conversion.
can anyone tell me how to do this ? I'll be grateful