switch in CI - 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: switch in CI (/showthread.php?tid=27990) |
switch in CI - El Forum - 02-26-2010 [eluser]Shaileen[/eluser] Hi, Can you help me with this function: It is written in perl and I want to convert it to PHP : while (@find_admin = $sth->fetchrow) { ($person, $refid, $admin_date_activated,$eu_company, $eu_contact, $quote_id, $email, $bandwidth_id) = @find_admin; SWITCH: for ($bandwidth_id) { /0/ && do { $speed = "**"; last; }; die "FAIL SWITCH :: bandwidth_id : $bandwidth_id"; } How can i write it in CI... Have to implement it in the foreach loop in the view as: <td><?=$item->bandwidth_id; ?></td> //something like this.. |