এর কারণ যদি আপনি &&ব্যবহার করেন তবে উভয় শর্তই সত্য হতে হবে। যদি কোনো একটি শর্ত মিথ্যা হয়ে যায়, তাহলে সামগ্রিক শর্তটি মিথ্যা বলে মূল্যায়ন করে।
পিএইচপি কোডটি নিম্নরূপ -
উদাহরণ
<!DOCTYPE html>
<html>
<body>
<?php
$firstCondition= "John";
$secondCondition = "David";
if ($firstCondition == "John" && $secondCondition == "David" && ($firstCondition == "Mike" || $firstCondition == "John")) {
echo "The above condition is true";
} else {
echo "The above condition is not true";
}
?>
</body>
</html> আউটপুট
The above condition is true