store sting values in single field not id below that code i tried but it stored id.and in database which type i have to use
$lid= mysql_insert_id();
$cityid = trim(ucwords(strtolower(mysql_real_escape_string($_POST['city']))));
$city = trim(ucwords(strtolower(mysql_real_escape_string($_POST['city']))));
$num=count($_POST["place"]);
$ids = array();
foreach($_POST['place'] as $val)
{
$ids[] = (int) $val;
}
$ids = implode(',', $ids);
$sql3 = mysql_query("INSERT INTO `city_place`(`state_id`,`city_id`,city,`spaid`) VALUES ('$cityid','$ids','$city',$lid)");