I have this PHP code:
foreach( $wpdb->get_results(
) as $key => $row) {
echo \"[\'\". $row->DATE . \"\',\". $row->total_sales . \"],\";
}
There are a few approaches:
Of those options, I'd probably use #1, because it makes the code just a bit more self-documenting.