$find = '<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">'; $replace = $adv_portal_rotating_articles; $adv_portal = str_replace($find, $replace . $find, $adv_portal_rotating_articles);