$pagetext = $row2["pagetext"];
$pagetext = str_replace('{postid}', $row2['postid'], $row2['pagetext']);