One option is to keep the HTML separate from the code:
<?php
if (empty($id)) {
idForm();
}
else {
// do something else
}
// ... then at the end of the script where it does not disrupt the code flow:
function idForm()
{
?>
Search Customer : <br />
<select name = 'search_type'>
<option value = 'default'>-Select A Catergory-</option>
<option value = 'first_name'>First Name</option>
<option value = 'last_name'>Last Name</option>
<option value = 'address'>Address</option>
</select>
<input type = 'text' name = 'search_customer' />
<input type = 'submit' name = 'search' value = 'search' />
<?php
}
?>
Alternatively, all the HTML output functions could be in a separate include file, which you would require/include_once() at the start of your script, then call the desired output functions when and where they are needed.