php ternary operator formatting

后端 未结 3 1956
一个人的身影
一个人的身影 2021-01-25 23:57

This works:

\"/>

This does n

3条回答
  •  故里飘歌
    2021-01-26 00:59

    IMHO, parenthesis (as suggested by zerkms) makes code unreadable.

    Instead, think something like this:

    $value = isset($_POST['foo']) ? $_POST['foo'] : '';
    echo '';
    

提交回复
热议问题