That's pretty easy if you know which function to use. In order to do it in only one loop, you'll need to use the str_repeat() function. Here's the code:
Code: Select all
for($i=1; $i<6; $i++)
echo str_repeat('*', $i) . "<br />";
This will show the desired output on a page.