Click here to Skip to main content
14,329,474 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi,i have a undefined index when I declare my dropdown in php like this

$selectAction = '<select id="compAction" name="compAction" style="font-size: 12px" onChange="actionSelect(),document.redemptionsForm.submit();">';
foreach($arr as $option => $item){
$selectAction .= "<option id='" . $item . "' value='" . $item . "' " .
(($compAction == $item)?'selected':' ') . ">" . $item . "</option>\n";

}
$selectAction.="</select>";


what could the issue be?
Posted
Comments
krumia 17-Feb-12 4:37am
   
Try examining the HTML generated by this. That should be easier.
nathan666 17-Feb-12 4:44am
   
thanks , sorted this issue out , appreciatte your reply
nathan666 17-Feb-12 4:45am
   
It was just a php varaible that was not set
krumia 17-Feb-12 4:46am
   
You can mark the question "I've solved it myself" so others wont bother anymore.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100