Display fields as values in array from external SQL DB
I see no reason to use wpdb for this, unless your table is in the WordPress database. Also your code would be much clearer (and therefore less prone to errors) if you separate the fetching of the result into an array, and the processing of this array for transformation, from the generation of the final … Read more