I'm storing some values using the mysql json field type, in Sequel Pro I'm seeing them as follows
["feature1","feature2","feature3","feature4"]
In my PHP file, I can print out the contents using
echo $plan->features;
but what I want to do is look over each one so I can style them, but the problem is when I stick it in a foreach loop I get the following:
Invalid argument supplied for foreach()
My loop is straightforward
foreach ($plan->features as $features) {
}
I'm not sure I'm doing things right.
print_r($plan->features);? I don't see where you decode your json, nor where you assign it to the propertyfeatures.