Hi, I am getting the following error: "Parse error: syntax error, unexpected '{' on line 38" but I cannot see what is causing it. Any ideas? Here is my full code: <?php //get required files //config require_once("config.php"); //theme $html = file_get_contents('./theme/theme.html'); //get page $pg = $_GET['page']; //connect to DB mysql_connect($host, $user, $pass) or die(mysql_error()); mysql_select_db($db) or die(mysql_error()); //query $query = mysql_query("SELECT * from `pages` WHERE pagen='$pg'") or die(mysql_error()); // Perform Query $row = mysql_fetch_array($query); $html = str_replace('{content}', $row['content'], $html); $html = str_replace('{title}', $row['title'], $html); $html = str_replace('{footer}', @file_get_contents('./articles/footer.txt'), $html); $html = str_replace('{sidebox}', @file_get_contents('./articles/sidebox.txt'), $html); $html = str_replace('{mainlinks}', @file_get_contents('./articles/mainlinks.txt'), $html); $html = str_replace('{headerlinks}', @file_get_contents('./articles/headerlinks.txt'), $html); $news = '<ul>'; $newsq1 = "SELECT * from `news` ORDER by id DESC"; $newsq = mysql_query($newsq1); while ($row2 = mysql_fetch_array($newsq)) { $news .= ' <strong><a href="/page/news/202,'.$row2['id'].'">'.$row2['title'].'</a></strong><br /> '.$row2['teaser'].'</li>'; } $news = '</ul>'; $html = str_replace{'{newslist}', $news, $html); $html = str_replace('{clubname}', '', $html); $html = str_replace('{worldmenu}', '', $html); $html = str_replace('<h2>', '<h2 class="title>', $html); # Output Content echo $html; ?> Code (php):
Yup, little typo you had: $html = str_replace{'{newslist}', $news, $html); ^^^ $html = str_replace('{newslist}', $news, $html);