<br />↵<b>Parse error</b>: syntax error, unexpected ':' in <b>.../ajax.php</b> on line <b>87</b>
LINE 87: $conditions = ($this->input->post()) ? : array('tutor'=>$this->session->userdata('user_id'));
line 87 works fine on localhost, but when I use godaddy I get that error. Is there something I need to set in php.ini or something to get Ternary operators to work?
Thanks!
The ternary operator (as the name suggests) usually expects 3 arguments
With PHP5.3 its allowed to omit
$trueValue. In this case its$expris used for itYou probably don’t have PHP5.3 on your server. As you can see in my example its quite easy to fix this and make it ready for pre-5.3