[SOLVED]if or or then
Posted: Tue Dec 16, 2003 11:08 am
Does it exist any similar PHP code for the VB "if or then" syntax?
Code: Select all
if "something" or "something" thenA community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
if "something" or "something" thenCode: Select all
if ($something) {
// Do something
} elseif($something_else) {
// Do something else
} else {
// Do something
}Code: Select all
if ($something || $something_else) {
// Do something
} else {
// Do something else
}Code: Select all
<?php
if (empty($name) or empty($url) or empty($desc)) {
// Do something
}
?>Code: Select all
<?php
if (empty($name) || empty($url) || empty($desc)) {
// Do something
}
?>Code: Select all
If ($var == "that" || $var == "this"):
echo "that";
Else:
echo "its not that";
EndIf;oh, that was it!Bech100 wrote:what about
MarkCode: Select all
<?php if (empty($name) || empty($url) || empty($desc)) { // Do something } ?>