Hello! I've got a problem with PHP, not sure what I'm doing wrong. I'm trying to use a variable in a PHP include. I'm not a big fan of the Wordpress pages, and frankly I can't use them in this situation. So I've created the[FONT="Courier New"] index.php[/FONT] file that I'll be using for my page:
<?php include("http://example.com/curthemeset.php"); ?>
<?php include("http://example.com/wp-content/themes/" $curtheme "/header.php"); ?>
CONTENT
<?php include("http://example.com/wp-content/themes/" $curtheme "/bottom.php"); ?>
Which includes [FONT="Courier New"]curthemeset.php[/FONT], which is setting the [FONT="Courier New"]$curtheme[/FONT] variable:
<?php
$curtheme="theme1";
?>
However, when I try putting this all together using the [FONT="Courier New"]index.php[/FONT] file, I get the error "Parse error: syntax error, unexpected T_VARIABLE in /home/public_html/fan/collective/index.php on line 2." Can anyone help me? 😕