Javascript array to codeigniter controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Javascript array to codeigniter controller (/showthread.php?tid=12365) Pages:
1
2
|
Javascript array to codeigniter controller - El Forum - 10-17-2008 [eluser]Nick Husher[/eluser] The following code selects a list of names out of a table, orders them by their last name in alphabetical order and passes it to the view. Code: // myController.php The view starts by listing a bunch of in-page anchors to various IDs in the page with the form "alpha-{LETTER}", where letter is a letter of the alphabet. It then iterates through the list, creating a large header wherever the first letter of the last name changes. It attaches an ID to this header in a form that matches the above in-page anchors, so you can easily locate a name in a generally-accepted format. Code: // myView.php |