You are here: shortif (tertiary) fails with echo but not print ? « PHP Programming Language « IT news, forums, messages
shortif (tertiary) fails with echo but not print ?

Posted by Tyno Gendo on 05/01/07 15:36

I have just written a line of code like this (yes, many people think
this stinks bad):

<?php true == isset($page_seq) ? echo "$page_seq" : false; ?>

However it breaks with 'Unexpected T_ECHO'

But

<?php true == isset($page_seq) ? print "$page_seq" : false; ?>

Works as expected.

Anyone know why? Maybe its blindly obvious to someone, that time of
the day when the brain SLLLOOOOOOOWWS down.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация