Who is the programming C / C + + can not know the ternary operator, ECMA, and then used in PHP, Javascript and ActionScript. Hence a simpatca "line of code" (in this case PHP) useful, for example, to generate alternate rows in an HTML table, for example, but significant for many other applications:
1 | = $t == 0 ) ? "even" : "odd" ) (($ T = $ t == 0)? "Even" "odd") |
I remember seeing the first time this "magic" code on a Commodore 64 (year 1984) proposed by Compute! Gazette - Basic course in the form











There are no comments for this post
Leave a comment