PHP
What is PHP?
PHP is a popular general-purpose scripting language that is especially suited to web development.
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
Tags
Tips
Condition
// Condition
<?php
if ($say == 'hello') {
echo 'Hello, how are you?';
} else {
echo 'Bye';
}
?>
// Short condition
<?= $say == 'hello' ? 'Hello, how are you?' : 'Bye' ?>
<?php
if ($say == 'hello') {
echo 'Hello, how are you?';
} else {
echo 'Bye';
}
?>
// Short condition
<?= $say == 'hello' ? 'Hello, how are you?' : 'Bye' ?>