Home of web learners


Associative array is used to assign data with text key where indexed array used number to identify

It helps to use text where indexing with text is better to identify and a different type of data in array variable need to use

Lets look an example:

$colorinfo = array("name"=>"green", "type"=>"basic", "hexcode"=>"#0f0");
echo $color[name]."<br/>";
echo $color[hexcode];




Here,we see that we can use text instead of number in inedexed array,so by using text key we can easily work with those assigned data

It is very useful when work with varity type data and better to identify


About webn3rd