I want to generate all current available font awesome icons dynamically in my php code, so user can select it. Do I need to hardcode all icons in an array or database? or is there any shortcut light weight way to do this? for example;
<?php
foreach($fonticons as $icon){ // $fonticons is an abstract array, It have nothing
echo '<i class="fa '.$icon.'"></i>';
}
?>
so I should get;
<i class="fa fa-adjust"></i>
<i class="fa fa-anchor"></i>
<i class="fa fa-archive"></i>
<i class="fa fa-area-chart"></i>
<i class="fa fa-arrows"></i>
<i class="fa fa-hand"></i>....
is it possible?
I came to know that,
every font awesome icon has a unique unicode.
for example fa-adjust
unicode is F042
. you can see it in console css as . So what if set counter starts to F042
and loop and increment it in hex. and display this in html?
I can just copy paste this array and start using it. But I want it dynamic.