Add Class via URI - CodeIgniter


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?$uri = $this->uri->rsegment_array()?>
  2. <?=($uri[1] == 'main') ? 'class="main sel"' : 'class="main"'?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.