I'm working on showing the data from the DB using html table and google charts. In one part of the script im using an IF loop,that is very important.It operates the things that's gonna be shown on the screen.But the IF loop doesn't work like it should be.
<?php if($IF==3){ ?>
<div class='row'>
<div class='col-md-4'>
<div id="first" style="width: 900px; height: 500px;"></div>
</div>
<div class='col-md-4'>
<div id="second" style="width: 900px; height: 500px;"></div>
</div>
<div class='col-md-4'>
<div id="third" style="width: 900px; height: 500px;"></div>
</div>
</div>
<?php
} else if($IF==2){ ?>
<div class='row'>
<div class='col-md-6'>
<div id="first" style="width: 900px; height: 500px;"></div>
</div>
<div class='col-md-6'>
<div id="second" style="width: 900px; height: 500px;"></div>
</div>
</div>
<?php }else{?>
<div class='row'>
<div class='col-md-12'>
<div id="first" style="width: 900px; height: 500px;"></div>
</div>
</div>
<?php } ?>
Let's explain what i wanted to do here.If the variable $IF equals 3 (number of employees) it shows 3 pie charts,and this part works.It shows the right data and the right amount of pie charts. But the problem appears when $IF<2. The pie charts won't show. Am i doing this the wrong way? Thx in advance.