![]() |
Code does not seem to work? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Code does not seem to work? (/showthread.php?tid=7464) |
Code does not seem to work? - El Forum - 04-10-2008 [eluser]Tom Glover[/eluser] I have a clients website, in which I need it to write a form from and array. In the view file: Code: <select name="relayletter2" id="relayletter"> The array that is passed to it: Code: $letters = array('a','b','c','d','e','...') It is meant to compare that to what it is getting for the database, and when it finds a match it is meant to set the option selected. At the Moment all options are selected. Code does not seem to work? - El Forum - 04-10-2008 [eluser]Thoer[/eluser] What does the good ol' var_dump test say? ![]() Code does not seem to work? - El Forum - 04-10-2008 [eluser]MadZad[/eluser] Plus, can change this line Code: <option selected="selected" value="<?=$letter?>"><?=$letter?></option> Code: <option selected="selected" value="<?=$letter?>">letter=<?=$letter?>, selected=<?= $selected ?></option> |