if (isset($_POST['sub']))
{
$grpm_phno = $_POST['grpm_phno'];
$grmid = $_POST['groupid'];
$grpm_name = $_POST['grpm_name'];
$name = explode(',', "$grpm_name");
$phone = explode(',', "$grpm_phno");
$countt = count($name);
for ($i = 0; $i <= $countt; $i++)
{
$x = $name[$i];
$y = $phone[$i];
$dt = date('Y-m-d h:i:s');
// Insert Query of SQL
$query = mysql_query("insert into grp_mst(grpm_name, grpm_phno, grpm_grpcatm_id,grpm_typ,grpm_crtdon) values ('$x', '$y', '$grmid', 'b', '$dt')");
}
}
input given:
name:raj,mohan
number:61231,3618372
output:
raj :61231
mohan:3618372
and empty row any help