有两种方法,我对json比较熟练
第一种json,在MySQL的栏位中datatype改成json,INSERT到资料库需以json_encode来转换,
输出的话则是json_decode,再以foreach显示出来。
第二种serialize的方式datatype为varchar或text,以下连结第三步还没研究有点时间的话再看看
https://makitweb.com/how-to-store-array-in-mysql-with-php/
有两种方法,我对json比较熟练
第一种json,在MySQL的栏位中datatype改成json,INSERT到资料库需以json_encode来转换,
输出的话则是json_decode,再以foreach显示出来。
第二种serialize的方式datatype为varchar或text,以下连结第三步还没研究有点时间的话再看看
https://makitweb.com/how-to-store-array-in-mysql-with-php/