$link = array( 'href', 'hxxf="http://www.vbulletin.org', 'hxxf="http://www.vbulletin.com' ); $word = array( 'hxxf', 'href="http://www.vbulletin.org', 'href="http://www.vbulletin.com' ); $this->post['message'] = str_ireplace($link, $word, $this->post['message']);