Akbarali, xa else yoki degan ma`noda {} bu belgi sizning ko`dingiz boshlanib tugash joyini aniqlab beradi uni qo`ysangiz yaxshi lekin qo`ymasangiz ham bo`ladi.
Maslaxatim qo`ygan ma`qul!+ qo'shimcha sifatida:
Kod · PHP
if ($test)
echo 'test bor';
else
echo 'test yo\'q';
echo 'bu matn endi if else ga umuman aloqasi yo\'q';Kod · PHP
if ($test) {
echo 'test bor';
} else {
echo 'test yo\'q';
echo 'rostdan ham test yo\'q';
echo 'test yo\'q, birinchi testni siz yarating';
}
echo 'endi bu matn if else ga aloqor emas!';