Preparing array with all details and while storing using serialize() function.
When required getting the data from the database and unserializing using unserialize() function
Exmpale
$aryDetails = array();
$aryDetails[0] = array('fname'=>'Praveen', 'lname'=>'Kumar', ......etc);
..
..
..
$aryDetails[100] = array('fname'=>'Carol', 'lname'=>'Lander', ......etc);
$serializeData = serialize($aryDetails);
// Storing this data into data base
mysql_query("INSERT INTO sample(sno, content) VALUES (1, '".addslashes($serializeData )."')", $con);
// getting data from this table when required
$query = mysql_query("SELECT content FROM sample", $con);
$resultSet = mysql_fetch_assoc($query);
$content = $resultSet['content'];
$aryResultDetails = unserialize($content);
If count of $aryDetails array is less then working fine, if it is big like count 100 then it is not working while unserializing.
Thanks
Praveen