how to insert multiple of values in a single field in mysql
i want to insert multiple values into a single field, i don’t know how to achieve this i’m using a long-text data type field.
Can you please tell me how can i solve this issue.
Share
Thanks. Its working for me.
Here is the code.You can try it.
<?php $dataarray=$_REQUEST['data'];
$post_data="";
foreach($dataarray as $data)
{
$post_data.= $data.",";
}
$final_data=substr(trim($post_data), 0, -1);
$sql= "insert into tablename set post_data ='".$final_data."'";
?>