dpdt79577 2014-12-31 03:47
浏览 47

PHP短标签echo方法(不等于)

Very simple:

So... That is working perfectly

<?=($A>9)?":)":":(";?>

Now... How can I say the same exact thing without = AND without echo ?

iow... I want to use that shortcut technique inside php code in between other php lines.

so this is NOT the correct syntax but just to get the idea more clearly...

<?

$A=50;

($A>9)?":)":":(";

?>
  • 写回答

1条回答 默认 最新

  • dpkrh2444 2014-12-31 03:49
    关注

    Well, you could simply not use PHP. If you want that text to be there without PHP's syntax, you don't have to use it in the first place.

    Just include

    ($A>9)?":)":":(";
    

    directly in the source text.

    评论

报告相同问题?