Jump to content

Leatfield

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by Leatfield

  1. Thanks For your help. Yes the HTML is not great i intend to tidy that up. one of the arrays had a space between the comma E.G Element1, Element2, Element3 The space was the cause of the problem. Thans for the prompt reply! Leatfield
  2. Hi There, I have the following code: two arrays: $user_body_group & $DB_Seconday_muscles I want to look up the "$DB_Seconday_muscles" Array and search for the elements in the "$user_body_group" array The result would be displaying a checkbox list with only the items in the "$user_body_group" array checked: foreach($DB_Seconday_muscles as $value) { echo "<input name=\"colors[]\" type=\"checkbox\" value=\"$value\""; if (in_array($value,$user_body_group)) { echo "CHECKED"; } echo "> $value "; } BUT... When i run thi script i only get the first element in the searched array ticked. Can anyone help! Many Thanks! Leatfield
×
×
  • 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.