How are you looping through the array? Using a for() loop, you variable will be your key.
for($i=0;$i<count($array);$i++) {
echo "Key is ".$i." and value is ".$array[$i]."<br />";
}
A foreach loop should work too
foreach($array as $key => $value) {
echo "Key is ".$key." and value is ".$value."<br />";
}