本文整理匯總了PHP中Region::prepareName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Region::prepareName方法的具體用法?PHP Region::prepareName怎麽用?PHP Region::prepareName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Region
的用法示例。
在下文中一共展示了Region::prepareName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: UserRegion
} else {
?>
<?php
$ur = new UserRegion();
$userRegions = $ur->getByIdUser($idUser);
?>
<tr>
<td><label for="regions"> Regiones </label></td><td>
<select id="regions" name="region">
<?php
foreach ($userRegions as $r) {
$region = new Region($r->prepareId_region());
echo '<option value="' . $region->prepareId_region() . '"> ' . $region->prepareName() . ' </option>';
}
?>
</select>
<center><span id="selectR" style="display:none;"> <b>Selecciona una región</b></span></center>
</td>
</tr>
<?php
}
?>
<tr>
<td> <label for="status"> Estado <label> </td>
<td>
示例2: substr
$id = $a->prepareEconomic_unit_id();
echo '<tr><td> <input type="checkbox" class="check" value="' . $id . '" name="args[]" /> </td>';
echo '<td> ' . $a->prepareEconomic_unit_name() . ' </td>';
echo '<td> ' . $a->prepareEconomic_unit_street_type() . ' </td>';
echo '
<td> ' . substr($a->prepareEconomic_unit_description(), 0, 30) . ' </td>
';
echo '<td> ' . $a->prepareEconomic_unit_street_name() . ' </td>';
echo '<td> ' . $a->prepareEconomic_unit_location_number() . ' </td>';
echo '<td> ' . $a->prepareEconomic_unit_phone() . ' </td>';
echo '<td>';
$idRegion = $a->prepareEconomic_unit_region();
if (!empty($idRegion)) {
try {
$region = new Region($idRegion);
echo $region->prepareName();
} catch (Exception $e) {
echo "Sin región";
}
}
echo '</td>';
$status = $a->getActive();
$status = $status == true || $status == "Yes" || $status == 1 ? "Activo" : "Inactivo";
echo '<td> ' . $status . "</td>";
$status = $a->getVerified();
$status = $status == true || $status == "Yes" || $status == 1 ? "Verificado" : "No verificado";
echo '<td> ' . $status . "</td>";
if ($canEdit) {
echo '<td><center><a href="edit.php?id=' . $id . '"><img src="' . ICON . 'edit.png" /></a> </center></td>';
}
if ($canDelete) {