PHP Learning : Associate array - Publik Talk

Breaking

An informative website for every one.

Post Top Ad

Post Top Ad

Wednesday, August 2, 2017

PHP Learning : Associate array

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:



No comments:

Post a Comment

Post Top Ad