Hi guys,
I have a problem with this bit of code that works fine on PHP4 but throws a "Fatal error: Cannot use string offset as an array in ..." on PHP5.
Code:
$code_html = str_replace("<!--{banner:" . $row[0]["banner_zone_ID"] . ":" . $row[0]["banner_zone_name"] . "}-->", $banner_array["glob"][rand(0, (sizeof($banner_array["glob"]) - 1))], $code_html);
It's $banner_array that causes problem but what's wrong with it and how can I fix it?
Many thanks