This seems simple enough, but my googling seems to be off to get the right answer:
I am dynamically making an array
$data = array();
$data['this is text'] = 1312;
$data['heres more text'] = 191;
$data['im also a unique entry'] = 239
I then want to go through each item and get the key and the value:
foreach($data as $datapoint)
{
var_dump($datapoint); //this seems to just be the value
$k = key($garavg); //this does not work because datapoint is a value not an array
}
I simply want to be able to do this:
echo "$key has this many entries $value";