PHP (array.php)
<html><head><title>Belajar Array</title></head>
<body>
<?php
$kalimat="bakso,mie,tahu campur,tempe,tahu,kacang";
$pecah=explode(",",$kalimat);
echo '<form name="explode">';
foreach($pecah as $key => $pecah2){
echo "<input type='checkbox' value=$key>$pecah2<br>";
}
echo '</form>';
?>
</body>
</html>
Tidak ada komentar:
Posting Komentar
Leave a message