<?php

$data = array(
    'name'=>"John Doe",
    'age'=>20,
    "company_name"=> "XYZ"
);

echo $data['name']. "\n";
echo $data['age']. "\n";
echo $data['company_name']. "\n"; 

?>

Output:

$ php associative_array.php
John Doe
20
XYZ

 

Leave A Comment