jkkenzie Posted October 9, 2008 Share Posted October 9, 2008 Am having such codes as below: <h1> <? =$_SESSION['translator']->out('WELCOME')?>!</h1> But the output on my page looks like this: out('WELCOME')?>! for that line of code. When i change the <? to <?php an error occurs: Parse error: syntax error, unexpected '=' ....on line... help Regards, Jose Link to comment https://forums.phpfreaks.com/topic/127679-tpl-errors/ Share on other sites More sharing options...
Andy-H Posted October 9, 2008 Share Posted October 9, 2008 The = echo only works with short tags, try using <?php echo $_SESSION['translator']->out('WELCOME'); ?> Also I think the session is empty, do you have the session_start(); anywhere on the page or any included pages? <?php session_start(); if ( empty($_SESSION['translator']) ){ echo "Session empty."; } ?> Link to comment https://forums.phpfreaks.com/topic/127679-tpl-errors/#findComment-660759 Share on other sites More sharing options...
jkkenzie Posted October 13, 2008 Author Share Posted October 13, 2008 that worked thanks alot Link to comment https://forums.phpfreaks.com/topic/127679-tpl-errors/#findComment-663871 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.