
نوشته اصلی توسط
m3hdi
دوست عزیز دستورات درست هستند

شما باید از جاوا اسکریپت استفاده کنید
موفق باشید
---------- Post added at 06:55 PM ---------- Previous post was at 06:54 PM ----------
یک خط کامند نیازی به }{ نداره

کد 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');
?>