Hi all,
I'm trying to output a nested loop that shows numbers from number 1 being a small font to 12345 being the biggest font but I can't seem to get it working correctly,see attached code.
1 = font 10
12 = font 12
123 = font 14
1234 = font 16
12345 = font 18
<?php
$sz=array("10px","12px","14px","16px","18px");
for ($i=1;$i<6;$i++) { ?>
<span style="font-size:<?= $sz[$i-1] ?>"><?= $i ?></span><br />
<?php
}
?>
Regards,
James.