switch in CI

#1
[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>&lt;?=$item->bandwidth_id; ?&gt;</td> //something like this..


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.