How to store array objects to mysql database in PHP?

How to store simple arrays or json objects in mysql in PHP? This is one of solutions. Use json_encode.


$a = ["a","b","c"];

$jsonstr = json_encode($a);

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *