[ create a new paste ] login | about

Link: http://codepad.org/HP2jTt0x    [ raw code | output | fork ]

PHP, pasted on Apr 10:
1
2
3
4
5
6
7
8
9
10
<?php
$arg = 'T';
$vehicle = ( ( $arg == 'B' ) ? 'bus' :
             ( $arg == 'A' ) ? 'airplane' :
             ( $arg == 'T' ) ? 'train' :
             ( $arg == 'C' ) ? 'car' :
             ( $arg == 'H' ) ? 'horse' :
             'feet' );
echo $vehicle;
?>


Output:
1
horse


Create a new paste based on this one


Comments: