I have this complex code which writes the contents of an array inside a div using a loop with PHP =>
<div class="row" >
<?php for ($b=0; $b<=($uz-1); $b++) { ?>
<a <?php if($b<($uz-1)){
echo "href";} ?>="<?php echo site_url('welcome/index/hamleno/'.($b+1).''); ?>">
<?php echo $hml[$b]." "; ?></a> <?php } ?>
</div>
The problem I have is that I need to compare $b outside of the loop just inside the opening div like this=>
<div class="row <?php if( $b==$ti){echo "some-class"} ?> ">
I can't figure out a chic way; can anyone help?