Guest Posted July 7, 2003 Share Posted July 7, 2003 Hi There, I want to include a header.php based on the category id... in my code on the product.php page I have this: <?php require(DIR_WS_INCLUDES '.'$category_id''".php")?> However how do I get is so if the category id is 21 that it includes the header file 21.php I am very new to PHP Thanks Link to comment Share on other sites More sharing options...
Guest Posted July 7, 2003 Share Posted July 7, 2003 That should be <?php require(DIR_WS_INCLUDES ' . $category_id . '.php')?> If the category_id is 21, that should include 21.php (assuming includes/21.php exists). Good luck, Matt Link to comment Share on other sites More sharing options...
Guest Posted July 7, 2003 Share Posted July 7, 2003 Hi Matt, tried that and got the error: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING Thank you for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.