Hi, I wonder if I can echo a string by the value of a variable.
Basically I need to echo $str the amount of times declared in the variable $cat5.
So if the value of $cat5 is 3, I want the image to be echoed three times.
How can I do this?
Am I on the right track?
[php]<?php
$str = ‘’;
$mycats = get_categories (‘include=4’);
$cat5 = $mycats[0]->category_count;
echo ($cat5)*$str;
?>[/php]
Thanks in advance!