Answers for "php ternary operator good example"

PHP
6

ternary operator in php

<?php
$marks=40;
print ($marks>=40) ? "pass" : "Fail";
?>
Posted by: Guest on July-03-2020
1

ternary in php

print ($marks>=40) ? "pass" : "Fail";
Posted by: Guest on December-03-2020
0

php ternary operator good example

<?php

$is_user_logged_in = false;

$title = $is_user_logged_in ? 'Logout' : 'Login';Code language: HTML, XML (xml)
Posted by: Guest on June-24-2021

Browse Popular Code Answers by Language