can i store data as array in php mysql code example

Example: save array in mysql php

$names_arr = array(“Toni Abbah”,”Anastacia Mast”,”Soji Igbonna”);
// Associative Array
$users_arr[] = array(“username”=>”Torah”,”name”=>”Toni Abbah”);
$users_arr[] = array(“username”=>”Anamast”,”name”=>”Anastacia Mast”);
$users_arr[] = array(“username”=>”soggy”,”name”=>”Soji Igbonna”);
// Serialize the Array
$names_str = serialize($names_arr);
$users_str = serialize($users_arr);

Tags:

Php Example