當前位置: 首頁>>代碼示例>>PHP>>正文


PHP State::getAll方法代碼示例

本文整理匯總了PHP中State::getAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP State::getAll方法的具體用法?PHP State::getAll怎麽用?PHP State::getAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在State的用法示例。


在下文中一共展示了State::getAll方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: site

if (isset($_POST['own_domain'])) {
    echo $_POST['own_domain'];
}
?>
" name="own_domain" style="display: block;">
                        <small>Caso possua informe aqui o domínio próprio do seu site (ele será usado no lugar do sub-domínio)</small>
                    </td>
                </tr>
                <tr class="form-field" style="display: none;">
                    <th scope="row"><label for="state">Localização</label></th>
                    <td>
                        <label for="state">Estado</label>
                        <select name="state" id="state">
                            <option value="">Selecione</option>
                            <?php 
foreach (State::getAll() as $state) {
    ?>
                                <option value="<?php 
    echo $state->id;
    ?>
" <?php 
    if (isset($_POST['state']) && $_POST['state'] == $state->id) {
        echo ' selected="selected" ';
    }
    ?>
>
                                    <?php 
    echo $state->name;
    ?>
                                </option>
                            <?php 
開發者ID:cabelotaina,項目名稱:redelivre,代碼行數:31,代碼來源:campaigns_new.php

示例2: State

                            <div class="control-group">
                                <form action="#" method="POST">
                                    <table style="margin-left: 20%;" width="100%" >

                                        <tr>
                                            <td>
                                                <label class="control-label" for="selectError">State</label>
                                            </td>
                                            <td>
                                                <div class="input-group" style="width: 50%">
                                                    <span class="input-group-addon"></span>
                                                    <select required="" name="state_id" class="form-control">
                                                        <option value="">--Select State--</option>
                                                        <?php 
$countryObj = new State();
$rows = $countryObj->getAll();
foreach ($rows as $row) {
    ?>
                                                            <option value="<?php 
    echo $row['id'];
    ?>
"><?php 
    echo $row['name'];
    ?>
 </option>
                                                        <?php 
}
?>
                                                    </select>

開發者ID:sonaljain888,項目名稱:legal-lawyer,代碼行數:29,代碼來源:add_city.php

示例3: State

                        Add 
                    </a><br/><br/>
                    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
                        <thead>
                            <tr>
                                <th>Id</th>
                                <th>State </th>
                                <th>Country </th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php 
$stateObj = new State();
$rows = $stateObj->getAll();
foreach ($rows as $row) {
    ?>
  

                                <tr>
                                    <td><?php 
    echo $row['id'];
    ?>
</td>
                                    <td class="center"><?php 
    echo $row['name'];
    ?>
</td>
                                    <td class="center"><?php 
    echo $row['country_name'];
開發者ID:sonaljain888,項目名稱:legal-lawyer1,代碼行數:31,代碼來源:state.php


注:本文中的State::getAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。