May 24, 2004

php 條件式字串表示

(expression?"string when expression=true":"string when expression=false");

ex.
echo ($a=="yes"?"YES":"NO");
當 $a = yes 時, 會秀出 YES, 否則會秀出 NO

Posted by pank at May 24, 2004 03:34 PM
Comments
Post a comment













Remember personal info?