I need to check empty input when post form data. I Have this Code :
foreach(array_filter($_POST['video']) as $video_url){
if (!empty($video_url)) {
echo 'true';
}
else
{
echo 'false';
}
}
But this code not work for empty input. I print_r($_POST['video']) when send empty input(before foreach code) and see this result:
Array ( [0] => )
how do check empty input in my case?!
truemessage but for empty input not work and not show any result.