I found out that it wouldn't work correctly with certain curly brackets it ... so they were removed, hence why they're not there.
I've tried the code you suggested after the eval() and it doesn't work, the plugin fails to load and executes the script after it.
The original code you posted :
PHP Code:
$counter = 0; // Starting counter
while($imgstuff = $db->fetch_array($imgquery))
{
eval('$eic_imagebits .= "' . fetch_template('eic_imagebits') . '";');
// ...
if($counter == 4) // That counts as 5 images
{
$eic_imagebits .= '<br />'; // Insert Line Break
$counter = 0; // Reset counter
}
else
{
$counter++; // Increment counter
}
}
Looks like it should be right, but the one thing I couldn't translate is while() statement - should it look more like this?
PHP Code:
while($numx => $amount_of_images_to_show)
To me that logically says, if the number of images to be display per line is less than the total number of images to be shown, then put them on the same line ... when it reaches $numx (eg 5), then insert the link break.
Hopefully you can follow my thinking! I thought this would be fairly straightfoward but as with everything I do, proving a headache!!
Cheers,
Jason