Created
January 25, 2012 16:42
-
-
Save josedaniel/1677160 to your computer and use it in GitHub Desktop.
Loop + condition example [codeigniter]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//create the array in the controller and add it ot the $data array | |
//then, in the view... | |
foreach($elements as $element){ | |
if($element->name == 'example'){ | |
//do stuff | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment