i am a beginner in coding. i have this kind of code.
<div class="row_add_house">
<span><?php echo _REALESTATE_MANAGER_LABEL_LISTING_TYPE; ?>:</span>
<span><?php echo $listing_type_list; ?></span>
</div>
At front end, this will appear as a drop down selection, and the $listing_type_list appear with three selection:
- select
- house for rent
- house for sale
and the 'select' is set by default. how can i set 'house for rent' as a default selection? anyone please help me.
if ($house->listing_type != 1) {
?>
<tr>
<td class="first_td" align="right">
<strong><?php echo _REALESTATE_MANAGER_LABEL_LISTING_TYPE; ?>:</strong>
</td>
<td width="270px" align="left">
<?php
$listing_type[0] = _REALESTATE_MANAGER_OPTION_SELECT;
$listing_type[1] = _REALESTATE_MANAGER_OPTION_FOR_RENT;
$listing_type[2] = _REALESTATE_MANAGER_OPTION_FOR_SALE;
echo $listing_type[$house->listing_type];
?>
</td>
</tr>
<?php
this is another part of the coding. this seems to be the 'if' statement of the dropdown menu, if the option is selected to 'for rent'of the dropdown menu. there are the option for $listing_type_list. how can i set the option automatically to select the $listing_type[1]?
$listing_type_list?