Advertisement
ujiajah1

assosiatif.php

Aug 27th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. <?php error_reporting (E_ALL ^ E_NOTICE); ?>
  2. <?php
  3. //Oleh Puji Ermanto http://hipster.comli.com/
  4. $case="Case Smartphone Terbaru";
  5. $toko="Anjara Store";
  6. $saya="Puji Ermanto";
  7. echo "HARGA " .strtoupper($case)." \n";
  8. echo strtoupper($toko)." Online Shop"." \n";
  9. $case_smartphone = array( 'xiaomi' => 75000 ,
  10.                'Oppo Neo 7' =>85000 ,
  11.                'asus zenfone' =>75000);
  12. foreach ($case_smartphone as $cassing => $hp ){
  13.     echo "[$cassing]=>$hp" ."\n";
  14. }
  15.  
  16. echo "harga xiaomi  = ". "Rp." .$hp. "\n"
  17. . "harga Oppo Neo 7 = ". "Rp." .$hp. "\n"
  18. . "harga Assus Zenfone = ". "Rp." .$hp;
  19. echo "\n";
  20. echo strtoupper($toko)." Online Shop"." Membuka Diskon"." \n"
  21. ."Untuk Pembelian Produk Lebih Dari 2 Item";
  22.  
  23. if($hp >= 2){
  24.     $diskon = (($hp*10)/100);
  25.     $bayar = $hp-$diskon ;
  26.     echo "anda mendapat diskon 10%, ". "\n"
  27.     ."anda hanya perlu membayar Rp. ".$bayar ; }
  28. ?>
  29.  
  30. <?php echo $saya."&#8482;"; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement