Dustin013 Posted June 22, 2010 Share Posted June 22, 2010 I am just setting up PHP on a new server and I am trying to enable to ability to use <?=$variable?> instead of typing out <?php echo $variable;?> ... Google doesn't really give me any results when searching for the term <?=, so I was hoping someone here could help me out Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/205556-how-do-you-enable/ Share on other sites More sharing options...
Alex Posted June 22, 2010 Share Posted June 22, 2010 You need to have short_open_tag enabled in php.ini. That being said, I wouldn't recommend that you use short tags. Sticking to your current method is preferred because it will be more widely supported. If you use short tags and your code is transfered to a server that doesn't have them enabled you will encounter problems. Quote Link to comment https://forums.phpfreaks.com/topic/205556-how-do-you-enable/#findComment-1075591 Share on other sites More sharing options...
Andy-H Posted June 22, 2010 Share Posted June 22, 2010 You need to have short_open_tag enabled in php.ini. That being said, I wouldn't recommend that you use short tags. Sticking to your current method is preferred because it will be more widely supported. If you use short tags and your code is transfered to a server that doesn't have them enabled you will encounter problems. I'll second that... Quote Link to comment https://forums.phpfreaks.com/topic/205556-how-do-you-enable/#findComment-1075600 Share on other sites More sharing options...
Pikachu2000 Posted June 22, 2010 Share Posted June 22, 2010 You need to have short_open_tag enabled in php.ini. That being said, I wouldn't recommend that you use short tags. Sticking to your current method is preferred because it will be more widely supported. If you use short tags and your code is transfered to a server that doesn't have them enabled you will encounter problems. I'll second that... And I'll third it. Doing that will only cause you headaches down the road. Quote Link to comment https://forums.phpfreaks.com/topic/205556-how-do-you-enable/#findComment-1075678 Share on other sites More sharing options...
radar Posted June 22, 2010 Share Posted June 22, 2010 just to ensure there is no misconceptions on what is being said here. i'll fourth everything thats being said... the ability to use <? ?> should be removed from PHP because it is fail! Quote Link to comment https://forums.phpfreaks.com/topic/205556-how-do-you-enable/#findComment-1075681 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.