khirulnizam

foreach tatasusunan

Jul 14th, 2021
1,356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <title>Senarai bulan tatasusunan</title>
  8. </head>
  9. <body>
  10.     <h1>Selamat datang admin</h1>
  11.     <?php
  12.         $record['rollno']=5;
  13.         $record['name']="Kerul";
  14.         $record['phone']="90346";
  15.        
  16.         echo "Nama: ".$record['name'];
  17.        
  18.     ?>
  19.  
  20.     <h1>Senarai bulan tatasusunan</h1>
  21.     <select>
  22.     <?php
  23.         $bulan=array('Jan','Feb','Mac','April', 'Mei','Jun',
  24.             'Julai','Ogos','Sept','Okt', 'Nov','Dis');
  25.         foreach ($bulan as $b){
  26.             //echo "$b <br>";
  27.             echo "<option> $b </option>";
  28.         }
  29.        
  30.     ?>
  31.     </select>
  32.    
  33. </body>
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment