Hi together,
I am quite new in PHP-Programming. Hope you can help me out. In general everything is working.
I getting a couple of PHP-Notice: Undefined offset:24 for example.
<select name="selectlist1" id=selectlistid1 size="1" >
<option value="None">No Component</option>
<?php
$Counter1 =0;
$Counter2 =0;
while ($Counter1<$Counter3){
echo '<optgroup Label="'.$array1[$Counter1].'">';
while($array1[$Counter1] == $array3[$Counter2]){
echo '<option>' .$array2[$Counter2]. '</option>';
$Counter2++; }
$Counter1++;
echo '</optgroup>';
}
?>
The failure is at the second while-loop. I separated each word to it's line and it's saying the failure ist the second counter of the second Array -> $Counter2
All Arrays + Counter 3 having values.
I tried to insert "if ($Counter1==$Counter3){ break;}" but it doesnt work. (I put it between $Counter1++ and echo '</optgroup>';
Many Thanks in advance!