Q:

Transform a mysql result (number) to something else

I'm searching a method to transform a string value from a MySQL request to something else.
This is the HTML:
<p class="secondaire">
    <i class="material-icons">lens</i>
    <i class="material-icons">lens</i>
    <i class="material-icons">lens</i>
    <i class="material-icons">radio_button_unchecked</i>
    <i class="material-icons">radio_button_unchecked</i>
</p>

I have a string value in my database like 4 for example. I want to do this:
Show 4 icons related with my string value in my database.
I don't know how to do this. I've tried a for and a while loop but none is showing what I want.

A:

Something like this?    
echo '<p class="secondaire">';

for($i=0;$i<intval($mysql_result_string);$i++){
    echo '<i class="material-icons">lens</i>';
}

echo '</p>';

