I've made a javascript script for adding/removing elements. Those elements are text fields inside a form. Is there some PHP script for counting how many they are? I tried the following script but if an element has been deleted it stops there. Thank you
<?
$i = 1;
if ($_POST[$i] == true)
{
while ($i != $_POST[$i])
{
echo $_POST[$i]."<br />";
$i++;
if ($_POST[$i] == false)
{
break;
}
}
}
?>
<?
$i = 1;
if ($_POST[$i] == true)
{
while ($i != $_POST[$i])
{
echo $_POST[$i]."<br />";
$i++;
if ($_POST[$i] == false)
{
break;
}
}
}
?>