An unfamilar if statement |
[eluser]ranjudsokomora[/eluser]
Hello CI Coders, I think this is an easy one, I just need some pointers. I was looking at modifying the router.php file, and stumbled across this code: Code: $this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route; I don't know what the Code: ? array() : $route Means, could someone explain or link me documentation on what the question mark, and colon mean? Thanks
[eluser]danmontgomery[/eluser]
That's the ternary operator. http://en.wikipedia.org/wiki/?: Code: echo ( $val == TRUE ? 'true' : 'false' ); |
Welcome Guest, Not a member yet? Register Sign In |