$start = 1;
$end = 20;
for ($i = $start; $i <= $end; $i++) {
if ($i % 2 == 0) {
echo $i . " is even.<br>";
}
}
Learn Developing | Jobs portal project in ASP.NET, Free Download Online job portal system project in asp.net, Free Download Online Shopping Project in PHP
$start = 1;
$end = 20;
for ($i = $start; $i <= $end; $i++) {
if ($i % 2 == 0) {
echo $i . " is even.<br>";
}
}
$number = 4;
if ($number % 2 == 0) {
echo "$number is an even number.";
} else {
echo "$number is not an even number.";
}
$intValue = isset($request->tot) && !empty($request->tot) ? intval($request->tot) : 0;
array = [1, 2, 3]
let array = [1, 2, 3];
int[] array = {1, 2, 3};
int array[] = {1, 2, 3};
$array = [1, 2, 3];
this query is used for update record into tables with join and where query which update all matching records.
UPDATE `product`
inner join `category` on `category`.`id` = `product`.`category_id` and `category`.`deleted_at` IS NULL
SET `product`.`category_id` = category.id WHERE `product`.`deleted_at` IS NULL AND `id` = '1'
this commands is used for install php 7.0 with cmd and various type of maths function
sudo apt install -y php7.0
sudo apt install -y php7.0-cli php7.0-fpm php7.0-common php7.0-json php7.0-opcache php7.0-mysql php7.0-phpdbg php7.0-mbstring php7.0-gd php7.0-pgsql php7.0-intl php7.0-curl php7.0-zip php7.0-xml php7.0-mcrypt php7.0-sqlite3 php7.0-xmlrpc php7.0-xsl
sudo sed -i "s#user = www-data#user = username#" /etc/php/7.0/fpm/pool.d/www.conf
sudo sed -i "s#group = www-data#group = username#" /etc/php/7.0/fpm/pool.d/www.conf
sudo sed -i "s#;cgi.fix_pathinfo=1#cgi.fix_pathinfo=0#" /etc/php/7.0/fpm/php.ini
sudo service php7.0-fpm restart
$start = 1; $end = 20; for ($i = $start; $i <= $end; $i++) { if ($i % 2 == 0) { echo $i . " is even.<br>"; ...