如何添加在我的搜索中找不到的结果


How to add no result found in my search?

http://www.phpropertydeals.com/
 Heres the website.. When im filtering all the property it works but when nothing just only a blank page? how can i add "no result found".

----------------------- here's the function filter ----------------------
function filter_propertytype($text){
    switch($text){
        case "commercial" :
            echo "Commercial";
        break;
        case "condo-apartment" :
            echo "Condo / Apartment";
        break;
        case "condotel-serviced-apartment" :
            echo "Condotel / Serviced Apartment";
        break;
        case "house-and-lot" :
            echo "House and Lot";
        break;
        case "lot-only" :
            echo "Lot Only";
        break;
        case "office-space" :
            echo "Office Space";
        break;
        case "resort-leisure" :
            echo "Resort / Leisure";
        break;
        case "townhouse" :
            echo "Townhouse";
        break;
    }
}

函数 filter_salerent($text){ 开关($text){ 案例"出租": 呼应"出租"; 破; 案例"出售": 回声"出售"; 破; } }

--- here's the landing page if no result found if there's no result just a blank page how can i add no result found?? to this codes -- 
<?php
                                $mypost = array( 'post_type' => 'condo');
                                $loop = new WP_Query( $mypost );
                                ?>

-------这是IM使用的表格,请检查网站链接,以便您可以看到我试图解释的内容,请帮助! ---

高级搜索

'">
                        <input input name="propname" class="text-field-input" placeholder="Property name">
                        <input input name="propid" class="text-field-input" placeholder="Property ID">
                        <select input name="dev" class="select-field-input" placeholder="Developer">
                            <option value="">Any Developer</option>
                            <?php 
                                    $res = get_cat_array('developer');
                                    foreach( $res as $rindx => $rval){
                                        echo "<option value='" . $rval->slug . "' >" . $rval->name . "</option>";
                                    }
                            ?>
                        </select>
                        <select input name="pt" class="select-field-input" placeholder="Property Type">
                            <option value="">Any Property Type</option>
                            <?php 
                                    $res = get_cat_array('property_type');
                                    foreach( $res as $rindx => $rval){
                                        echo "<option value='" . $rval->slug . "' >" . $rval->name . "</option>";
                                    }
                            ?>
                        </select>
                        <select input name="sale" class="select-field-input" placeholder="Sale Type">
                            <option value="">Any Sale Type</option>
                            <?php 
                                    $res = get_cat_array('sale_type');
                                    foreach( $res as $rindx => $rval){
                                        echo "<option value='" . $rval->slug . "' >" . $rval->name . "</option>";
                                    }
                            ?>
                        </select>
                        <select name="location" class="select-field-input" placeholder="Location">
                            <option value="">Any Location</option>
<option>Caloocan</option>
<option>Las Pinas</option>
<option>Makati</option>

                        </select>
                        <select name="salerent" class="select-field-input" placeholder="Sale / Rent">
                            <option value="">For Sale & For Rent</option>
                            <?php 
                                    $res = get_cat_array('sale_or_rent');
                                    foreach( $res as $rindx => $rval){
                                        echo "<option value='" . $rval->slug . "' >" . $rval->name . "</option>";
                                    }
                            ?>
                        </select>
                        <select name="bedroom" class="select-field-input" placeholder="Number of Bedrooms">
                            <option value="">Any Number of Bedrooms</option>
                            <?php 
                                    $res = get_cat_array('no_of_bedrooms');
                                    foreach( $res as $rindx => $rval){
                                        echo "<option value='" . $rval->slug . "' >" . $rval->name . "</option>";
                                    }
                            ?>
                        </select>
                            <div class="mini-field">
                                <input input name="pricefrom" class="txt-field-input-mini formattingNumber" placeholder="Price from">
                                <input input name="priceto" class="txt-field-input-mini formattingNumber" placeholder="Price to">
                            </div>
                        <button type="submit" class="start-search-btn">Start Search<img src="<?php echo get_template_directory_uri();?>/images/search-img-white.png"  alt="Start Search" class="start-search-img"/></button>
                        </form>
 case "townhouse" :
    echo "Townhouse";
    break;
 default: 'No result found';

switch 语句中使用 default 参数。