CodeIgniter Forums
multiple nested IFs possible in view? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: multiple nested IFs possible in view? (/thread-20911.html)



multiple nested IFs possible in view? - El Forum - 07-25-2009

[eluser]cleansugar[/eluser]
Code:
<?php if (a == 0) :?>
     <?php if (a == 0) :?>
     <?php else:?>
          <?php echo(a); ?>
     <?php endif;?>
<?php else:?>
      <?php echo(b); ?>
<?php endif;?>

I want to make IF in IF in view.
But when I run the view, both echo a and echo b executed.
Is it impossible multiple ifs?


multiple nested IFs possible in view? - El Forum - 07-25-2009

[eluser]cleansugar[/eluser]
Don't reply.
Multiple IF is possible.
It was mistake.