我正在 PHP 电子邮件中发送 MySQL 查询结果。有两个字段date
和emailtext
。 emailtext
中还有一个日期部分,所以基本上它看起来像这样:
Date emailtext
02/21/2017 02-21-2017-this is today's price
02/22/2017 02-22-2017-this is today's price
从我的 PHP 电子邮件中,我可以显示emailtext
中的每一行(不包括日期):
`02-21-2017-this` is today's `price`
`02-22-2017-this` is today's `price`
我的目标是按日期显示emailtext
组:
02/21/2017
`02-21-2017-this` is today's `price 1`
`02-21-2017-this` is today's `price 2`
02/22/2017
`02-22-2017-this` is today's `price 1`
`02-22-2017-this` is today's `price 2`
有什么方法可以实现这一点,任何建议都将不胜感激。提前谢谢。