ایز این کدکد PHP:
<?php
if ($a > $b)
echo "a is bigger than b";
?>
Often you'd want to have more than one statement to be executed conditionally. Of course, there's no need to wrap each statement with an if clause. Instead, you can group several statements into a statement group. For example, this code would display a is bigger than b if $a is bigger than $b, and would then assign the value of $a into $b:
<?php
if ($a > $b) {
echo "a is bigger than b";
$b = $a;
}
?>
کد PHP:
<?php
if (2==2){
header('Location: /a.php');
}
?>
و یا این کد می توانید استفاده کنید
کد PHP:
<?php
if (2==2)
header('Location: /a.php');
?>
ویرایش توسط Woshka : December 4th, 2011 در ساعت 19:01
فروش سرور مجازی
http://www.maroonhost.net/vps-hosting.html
مارون هاست
برای خرید سرور تماس بگیرید 09123773197
در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)