开发者

php ternary operator

开发者 https://www.devze.com 2023-03-14 15:07 出处:网络
A little stuck I have the following echo isset($_开发者_C百科GET[\'start_date\']) ? $_GET[\'start_date\'] : date(\'d/m/o\');

A little stuck I have the following

echo isset($_开发者_C百科GET['start_date']) ? $_GET['start_date'] : date('d/m/o');

and my IDE is reporting an error I can't see it but if you can you will have my eternal gratitude.

I know I should not be echoing this straight out but in the short term I want to get this up and running so an echo will suffice for now, eventually to be replaced by a variable.


Update your IDE.
Or use a better IDE.


Add another () around your isset (basically around your 'if' )

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号