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

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: multiple nested IFs possible in view? (/showthread.php?tid=20911)



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.