Hi,
I’m trying to replace a placeholder of text in a template with a list of articles from a database - I know it possible I just can’t figure it out.
eg.
foreach ($record as $news) {
$page = str_replace('{month}', date('M', $news['posted']), $page);
}
$page being the html loaded into a variable. I’m fairly sure it’s doing once, then stopping as the string no longer exists, but how can I duplicate the string?
Thanks
Phil