Return to Snippet

Revision: 13507
at December 23, 2009 13:45 by justinseiter


Updated Code
<?$uri = $this->uri->rsegment_array()?> 
<?=($uri[1] == 'main') ? 'class="main sel"' : 'class="main"'?>

Revision: 13506
at May 4, 2009 14:15 by justinseiter


Updated Code
<?$uri = $this->uri->rsegment_array()?> 
<?=($uri[1] == 'main') ? "class='main sel'" : 'main'?>

Revision: 13505
at April 27, 2009 12:04 by justinseiter


Updated Code
<?$uri = $this->uri->segment_array()?> 
<?=($uri[1] == 'main') ? "class='sel'" : ''?>

Revision: 13504
at April 26, 2009 14:51 by justinseiter


Initial Code
<?$bar = strtolower($this->uri->segment(1));?>
<?if ($bar == '' || $bar == 'main') echo "class='sel'"?>

Initial URL

                                

Initial Description

                                

Initial Title
Add Class via URI - CodeIgniter

Initial Tags
php, codeigniter

Initial Language
PHP