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 Quote 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."; } ?> Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/127679-tpl-errors/#findComment-663871 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.