Answers for "how to add if one line condition in php"

PHP
5

write if and else in one line php

$result = ($data->status == 1) ? 'active' : 'disable'
Posted by: Guest on November-08-2020
2

one line if statement php

echo ($var1 >= $var2) ? 'this is true' : 'this is false';
Posted by: Guest on April-19-2021

Code answers related to "how to add if one line condition in php"

Browse Popular Code Answers by Language