<?php
if ($a > $b) {
echo "a is bigger than b";
$b = $a;
}
?>
<?php
/*
The Syntax for the if statement is:
if (condition) {
code to be executed if condition is true;
}
The condition must be in paranthesis
If else:
if (condition) {
code to be executed if condition is true;
} else {
code to be executed if condition is false;
}
If... elsif... else:
if (condition) {
code to be executed if this condition is true;
} elseif (condition) {
code to be executed if first condition is false and this condition is true;
} else {
code to be executed if all conditions are false;
}
*/
$t = date("H");
if ($t < "10") {
echo "Have a good morning!";
} elseif ($t < "20") {
echo "Have a good day!";
} else {
echo "Have a good night!";
}
?>
if ($a > $b) {
echo "a is bigger than b";
} elseif ($a == $b) {
echo "a is equal to b";
} else {
echo "a is smaller than b";
}
if(mysqli_num_rows($query_run) > 0)
{
//$rowCount=mysqli_num_rows($query_run);
//$spreadsheet = new Spreadsheet();
//$sheet = $spreadsheet->getActiveSheet();
$count=27;
while($row = mysqli_fetch_array($query_run)){
// echo $row['hall'] ;
// echo $row['regno'] ;
// echo $row['session'] ;
$sheet->setCellValue('A'.$count, $row['hall']);
$sheet->setCellValue('B'.$count, $row['regno']);
$sheet->setCellValue('C'.$count, $row['session']);
$sheet->setCellValue('D'.$count, $row['classroll']);
$sheet->setCellValue('E'.$count, $row['examroll']);
$sheet->setCellValue('F'.$count, $row['name']);
$count++;
}
Code Example |
---|
Php :: laravel withwhere |
Php :: View [layouts.master] not found |
Php :: custom blade directive |
Php :: phpmailer |
:: php insert char before each letter using regex |
Php :: pre_get_posts order by title |
Php :: check email veriy or not laravel |
Php :: php inverse / arc cosine |
:: php current page |
Php :: drupal show php errors |
Php :: php mail() |
Php :: php loop through obect |
Php :: laravel sync with attributes |
Php :: magento 2 add in static block |
Php :: eloquent search ignore case |
Php :: pass the product name to form field cf7 woocommerce |
Php :: php get api |
Php :: read input from user |
Php :: php if null then 0 |
Php :: havingraw in laravel |
Php :: twig render to string |
Php :: check if second array has all the values from the first element php |
Php :: php variable definition |
Php :: array map php |
Php :: |
Php :: |
Php :: php interview questions for 2 year experience |
:: |
Php :: laravel 8 jwt api authentication |
Php :: logout all users laravel 8 |