in the $admission_id few numbers are available as array,i got those array numbers one by one by using explode function.after that i put those numbers one by one to a query using for loop.that i wanted to know the way i put into a query is correct. specially the variable which i mansion in red color
$admission_no = explode("~",$admission_id);
for ($i=0;$i<=$x;$i++)
{
$query = "select amount_id from payment where admission_no='".[COLOR="Red"]$admission_no[$i][/COLOR]."'";
$result1=mysql_query($query1);