I have a problem to count total record inside foreach using php.
My code is here
$User_Line=@mysql_fetch_array(mysql_query("select * from tb_user where user_login_id='$_SESSION[SEEKER_ID]'"));
$userskill=explode(",",$User_Line['user_skills_id']);
foreach($userskill as $skill)
{
$tb_job=mysql_query("select * from tb_job where job_keyskills like '%$skill%'");
$tb_job2=mysql_fetch_array($tb_job);
echo "TOTAL=".$value=mysql_num_rows($tb_job);
}
Current result is coming like TOTAL=12 TOTAL=4 TOTAL=0
But It should be like TOTAL = 16
Please help me