Follow on Facebook

header ads

logical operator in php

logical operator in php


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Empty logical operator</title>
</head>
<body>
<?php
$a = "welcome";
if(!empty($a)) // this empty function check var a is empty or not.
{
echo "a has some value.";
}
else{
echo "variable is empty.";
}
?>
</body>
</html>

Post a Comment

0 Comments