I try to define an array, but although having read all of the suggestion here, I still got an error notice when execute.
My form consist among everything else, field min which define the number of textareas in
<input type="text" name="min[1]">
My PHP file has:
<?php
$min = $_POST['min'];
$area = array();
for($j=1; $j=<$length; $j++) {
if($_POST['row'][$j] != "") {
if(($_POST['min'][$j])!="") {
for($k=1;$k<=$min[$j];$k++) {
$area[$j] .= '<textarea name="label'.$j.$k.'" rows="3"' ></textarea>';
}}
if(($_POST['min'][$j])=="") {
$area[$j] = '<textarea name="label'.$j.$k.'" rows="3"'" ></textarea>';
}
$blah .= $j.') '.$row[$j].'<br/>'.$area[$j].'<div id="inner'.$j.'"></div><br/><br/>';
}}
I can see that the problem is in array, because the script try to locate the keys which are not there. So how to defne this in advance... This works but it's no solution as you can se:
$area = array("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",);