<?php $percentage = 0.3; $x = ceil($percentage * 10); $x = min(10, $x); // assure no one messes with range echo str_repeat('o', $x);
You have javascript disabled. You will not be able to edit any code.