Description:
Associative arrays are arrays that use named keys that you assign to them.
The named keys can then be used in a script:
Code:
<?php
$ages['peter']="32";//ages is array peter is a person and value is age//
$ages['john']="30";
$ages['joe']="34";
echo "peter is".$ages['peter']."years old.";
?>
Output:
Associative arrays are arrays that use named keys that you assign to them.
The named keys can then be used in a script:
Code:
<?php
$ages['peter']="32";//ages is array peter is a person and value is age//
$ages['john']="30";
$ages['joe']="34";
echo "peter is".$ages['peter']."years old.";
?>
Output:
No comments:
Post a Comment