Can somebody help i'm trying get the total of loop.
Heres my code
echo '<form name="fproduct" action="product.php" method="post">
<br/><textarea name="item" rows="10" cols="20"></textarea> <br/>
<input type="submit" value="Submit" />
</form>';
if(isset($_POST['item'])) {
$j = 0;
$arry=explode( "\\
", $_POST['item'] );
for ($i = 0; $i <= count($arry); $i++) {
if((trim($arry[$i])) != null) {
$j++;
}
}
Print $j;
}
Whats wrong with this.