Same problem. $item[3] is empty, then so is $item3, and you're back to "section LIKE '%$item3%'" becoming "section LIKE '%%'".
If you're desperate to avoid building the query dynamically for some reason, preinitialise all your $item1 etc. with something that cannot appear as an item. Then continue with the code you have (or replace $item with $section and use the code you had at first).
This will result in a horribly inefficient query, but that's the price you'll be paying.
Me, I'd do something more closer to:
/ If there is a $setion array, break it up, wrap each part in a LIKE subclause, then OR all the parts together into one big WHERE clause.
/
if (isset($section))
{
$parts = explode(" ",$section);
foreach($parts as $part)
$part="(section LIKE '%$part%')";
$sections = join(' OR ', $parts);
}
$sql="SELECT DISTINCT e_mail FROM mytable WHERE ".$sections;
I think that looks about right...