Jump to content

Pecatto

New Members
  • Posts

    1
  • Joined

  • Last visited

Pecatto's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.