Sorry it was this code !: isset($_POST['n']))?$_POST['n']:null; I think it is like a conditon (if,then,else)? What exactly does it means ? Thanks Frank
Quite simply, as it reads...... If there is a form value named "submit" in the POST data then echo "test"
it means that <condition>?TRUE:FALSE; it is just like that... if(<condition>) { //true values here } else { //false values here } hope it helps
The other posters answered your question, but now I have a question -- when would such code be useful? Because if $_POST['n'] is not set (not "isset"), then wouldn't it automatically be null? In other words, isn't it like saying if an orange is not in the basket, then it is not in the basket?
the code is quite useless, it is because the isset() function checks null... cause, when u wanna use a ternary operator, chances are u need a catcher variable, $variable = (<condition>) ? TRUE : FALSE; just make sure ur program is very logical...