View Single Post
Old 11-03-2008, 02:47 PM  
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
Quote:
Originally Posted by borked View Post
echo ($sands == 'cool' ? 'Yaaay' : 'Boooo!');
I love abusing ternary, too.

Code:
<?php
define('RAD', TRUE);
define('BOGUS', FALSE);
define('DUDE', '');
define('NOWAY', 'Fucknaw.');
define('TOTALLY', 'Furshure.');
define('BEDAT', '==');
echo ( DUDE . $sands . BEDAT . RAD . DUDE ? TOTALLY . DUDE : NOWAY . DUDE) ."\n";
?>
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote