Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $rp_type = array(0=>'Vàng kiếm', 1=>'Vàng tiêu');
- ?>
- <select name="report_type" id="report_type">
- <?php
- $index_rp_type = intval(isset($_GET['report_type']) ? $_GET['report_type'] : -1);
- if($index_rp_type >= 0 && $index_rp_type < count($rp_type)){
- echo '<option value="'.$index_rp_type.'">'.$rp_type[$index_rp_type].'</option>';
- unset($rp_type[$index_rp_type]);
- foreach ($rp_type as $key => $value) {
- echo '<option value="'.$key.'">'.$value.'</option>';
- }
- } else{
- foreach ($rp_type as $key => $value) {
- echo '<option value="'.$key.'">'.$value.'</option>';
- }
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment