本文整理匯總了PHP中Patient::sexDef方法的典型用法代碼示例。如果您正苦於以下問題:PHP Patient::sexDef方法的具體用法?PHP Patient::sexDef怎麽用?PHP Patient::sexDef使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Patient
的用法示例。
在下文中一共展示了Patient::sexDef方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
class="sex patientrecord_Pre intentionRadioQuestion validate[required] "
value="1" data-errormessage-value-missing="性別必須選擇">
<label for="newaddintention_sex1" class="pr20"><?php
echo Patient::sexDef()[1];
?>
士</label>
<input type="radio" name="sex" id="newaddintention_sex0" desc="患者是位"
<?php
echo $sex == 0 ? 'checked' : '';
?>
class="sex patientrecord_Pre intentionRadioQuestion validate[required] "
value="0" data-errormessage-value-missing="性別必須選擇" >
<label for="newaddintention_sex0" class="pr20"><?php
echo Patient::sexDef()[0];
?>
士</label>
</p>
<p class="mt20">您是患者本人嗎?:
<input type="radio" desc="您是患者本人嗎?" id="newaddintention_self"
class="relation patientrecord_Pre intentionRadioQuestion validate[required]"
<?php
echo isset($relation) ? $relation == Patient::RELATION_SELF ? 'checked' : '' : '';
?>
name="relation" value="<?php
echo Patient::RELATION_SELF;
?>
" data-errormessage-value-missing="請選擇一個選項">
<label for="newaddintention_self"
class="pr20">是</label>
示例2: foreach
?>
</option>
<?php
}
?>
</select>
</span>
</td>
</tr>
<tr class="h30">
<td>性別</td>
<td>
<span class="fl pl10">
<?php
foreach (Patient::sexDef() as $key => $value) {
?>
<input type="radio" class="ml5" name="patientSex" value = "<?php
echo $key;
?>
" <?php
echo $key == $patient->sex ? 'checked' : '';
?>
>
<span class="ml5">
<?php
echo $value;
?>
</span>
<?php
}