Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- class Kamar extends CI_Controller {
- function index(){
- $post=$this->input->post();
- //asumsikan ini hasil dari model
- $kamar="<option>--pilih--</pilih>";
- for($i=1;$i<10;$i++){
- $kamar.="<option value='{$i}_{$post['kamar']}'>Kamar ";
- $kamar.=$post['kamar']."_".$i;
- $kamar.="</option>";
- }
- $result=array(
- 'kamar'=>$kamar
- );
- echo json_encode($result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement