I have the following sql that returns a row that is stored as an associative array in php
select count(*) as a from "tablename" where columnname = "some";
I know that this sql is going to return only one row with one column, namely ‘a’, each time its run. Is there a way to access that value instead of having to do a foreach loop.
Any help is appreciated
Yes, access the first array in your 2D array and then access the element with the key ‘a’: