Here's my array when I do a var_dump:
array (size=3)
'eventdate' => string '2016-08-27' (length=10)
'eventtype' => string 'transaction' (length=11)
'runningbal' => string '32.50' (length=5)
The name of the array is "$event."
I need to update "eventtype." My plan was to do a "foreach" in order to isolate each of the variables and then change "transaction" to "payment."
When I do this:
foreach($event as $sport)
{
echo $sport['eventtype'];
}
I get this: Warning: Illegal string offset 'eventtype' in C:\wamp\www\patient_focus\arrays.php on line 74
What am I doing wrong?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.