|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Question mark in code
OK semi silly question, in much of the php coding I see a line such as this:
PHP Code:
I beleive it's a shortcut for an if/else statement, but I'd like to get a better understanding of it. If someone could break it down and explain it to me I'd appreciate it. |
|
#2
|
||||
|
||||
|
(is this true)?'yes! do me':'no, do this';
Of course, perl style $var=$one || $two is much easier, but they didn't want to implement it ![]()
__________________
And you know I mean that. |
|
#3
|
||||
|
||||
|
Yeah, the above syntax is following the C syntax. It looks cryptic at first, but it is pretty simple and to the point.
|
|
#4
|
|||
|
|||
|
Thx, I knew it was something like that, just wasn't sure about it.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > Question mark in code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|