helloise Posted January 10, 2011 Share Posted January 10, 2011 how come the lines: PHP Code: echo $form['catcher_id']; $catcher_names = $form['catcher_id'] foreach($catcher_names as $val) { echo "testing loop"; } produce nothing?? its not doing the foreach. $form['catcher_id']; is a dropdown list containing catcher names please help? thanks Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 10, 2011 Share Posted January 10, 2011 My first guess would be that $form['catcher_id'] might not be an array. What is the output of var_dump($form['catcher_id']); ? Quote Link to comment Share on other sites More sharing options...
helloise Posted January 10, 2011 Author Share Posted January 10, 2011 $form['catcher_id'] gives me a dropdown list for the var_dump: how do i code this to see?? echo var_dump($form['catcher_id'])??? sorry me very new Quote Link to comment Share on other sites More sharing options...
the182guy Posted January 10, 2011 Share Posted January 10, 2011 When you submit a dropdown list on a form it will only send the selected value, so just one value, not the entire list. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.