I am not sure how clear my question is? But let me explain further. Before a person answers the test the result should be hyphen (-), When the person answers the test and gets a score it should display the score he has received. Now that was all working fine. But I noticed that when I score 0 It still displays as hyphen (-) when it should display 0. I will post my code below:
CODE:
<?php
if($skillsets)
foreach($skillsets as $skill => $percentage){ ?>
<div class="skill_block">
<div class="small"><?php echo $skill ?></div>
<?php if($percentage === 0) { ?>
<div class="big">0%</div>
<?php } else if($percentage == NULL) { ?>
<div class="big">-</div>
<?php } else { ?>
<div class="big"><?php echo $percentage ?>%</div>
<?php } ?>
</div>
<?php } ?>
Any help will be greatly appreciated. Thanks
19/01/2016
UPDATE:
The type of $percentage
is float