they want to use database (mysql) and php to store the products details.
well..one of the my function uses "serialize". taking values from a form and store it in db.
Code: Select all
for ($i = 1; $i <=10; $i++){
$componentNameї] = $_POSTї'componentName'.$i];
$componentValueї] = $_POSTї'componentValue'.$i];
}
$componentName=serialize($componentName);
$componentValue=serialize($componentValue);so..is there any way around this? i tried to use preg_replace to replace the character to something else...
Code: Select all
function convertStringToSQLFormat($string) {
return preg_replace('"', '^', $string);
}any help or advise is greatly appreciated