vmalli Posted February 12, 2007 Share Posted February 12, 2007 I am trying to include a title from another page this is what I am using, but it doesnt seem to work. <html> <head> <title><?php echo $name ?> - Some text</title> </head> <?php include("page.php"); ?> </html> The stuff in page.php <?php $name="blabla"; ?> <body> my other html </body> Link to comment https://forums.phpfreaks.com/topic/38208-solved-including-a-title-from-another-page/ Share on other sites More sharing options...
Balmung-San Posted February 12, 2007 Share Posted February 12, 2007 That would be because the variable $name isn't declared by the time it's used. It must be declared before it's used. Link to comment https://forums.phpfreaks.com/topic/38208-solved-including-a-title-from-another-page/#findComment-182954 Share on other sites More sharing options...
vmalli Posted February 12, 2007 Author Share Posted February 12, 2007 k thx Link to comment https://forums.phpfreaks.com/topic/38208-solved-including-a-title-from-another-page/#findComment-182959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.