I am currently battling this error message by refactoring some of my code:
Fatal error: Allowed memory size of 33554432 bytes exhausted
I figure I must have sloppy code somewhere. Is it a bad practice to load new models in a loop like so:
<?php
foreach($blog_ids as $blog_id) {
$blog = new Blog($blog_id);
echo $blog->title;
}
?>
Is this a quick way to burn up memory....and if it is, how do I accomplish the same goal?
EDIT:
the above code is just a snippet. I have tons of info for each blog - a model should most likely be the best way to handle it.
I may have up to 100 different blog listings on a page.