In PHP, array itself can be used as key value pair collection. There are 2 ways you can access an array. One is the well know way, using index. But in php, you can also create array with key for each value. Below sample code may give you idea about how to create keyed array and how to access that.
$_Courses_Students = array("C#.net" => 45, "VB.NET" => 40, "ASP.NET" => 80);
In the above code, values given before "=>" is Key. other side is value
One thing to remember is that, if the array is created with Key value pair, then you may not be able to access the array items using index. So, you may not be able to use "for loop" to access those value. Use "foreach" loop.
foreach($_Courses_Students as $_Course => $_Student)
{
//$Course will have key
//$_Student will have value
}
To access the array value directly we can use the key like below, will print 45
echo $_Courses_Students["C#.NET"]
This key value pair array is also knows as Associative Arrays