MySQL/PHP: return two columns as an associative array as key => value pairs
问题 I apologize if this might have been asked before, or if this isn't even possible, but here is what I am hoping to get from a particular table using MySQL. Say, I have the following table: +-------------+------------------+ | property | value | +-------------+------------------+ | style | unisex | | color | blue | | type | small | +-------------+------------------+ I would like to be able to fetch the two columns property and value as an associative array from MySQL , so the end result would