01010111010101011011000110101010101010110101010111010101011010101010101010101010101010101010101010101010
01010111010101011011000110101010101010110101010111010101011010101010101010101010101010101010101010101010
01010111010101011011000110101010101010110101010111010101011010101010101010101010101010101010101010101010
01010111010101011011000110101010101010110101010111010101011010101010101010101010101010101010101010101010
01010111010101011011000110101010101010110101010111010101011010101010101010101010101010101010101010101010
01010111010101011011000110101010101010110101010111010101011010101010101010101010101010101010101010101010

String to Array menggunakan fungsi explode PHP

<!--index.php-->
<table width="217" border="1">
<tr>
<td width="90">No</td>
<td width="111">Kata</td>
</tr>
<?php
$dok1 = "explode membagi string menjadi array berdasarkan string pembatas yang ditentukan ";
$array_dok1 = explode(" ", $dok1);
$jml = count($array_dok1)-1;
for ($a=0; $a<$jml; $a++){
$ke = $a+1;
?>
<tr>
<td>Kata ke-<? echo "".$ke ."" ;?></td>
<td><? echo "". $array_dok1[$a]. "<br>";?></td>
</tr>
<?
}
?>
</table>
<p>Jumlah kata dok1 : <? echo count($array_dok1)-1; ?></p>




Share this article :
 
 
Support : Creating Website | Mohammad Mastur
Copyright © 2011. Catatan Harianku - All Rights Reserved
Template Created by Creating Website Published by Mohammad Mastur
Proudly powered by Blogger