PHP

if / elseif / else (PHP)

Në shqip: if / elseif në PHP

ShpjegimiSQ

if, elseif dhe else ekzekutojnë kod sipas kushteve. Në PHP shkruhet elseif bashkë (edhe else if punon). Në shabllone HTML përdoret edhe sintaksa if (...): ... endif;.

EnglishEN

if, elseif and else run code depending on conditions. In PHP elseif is written as one word (else if also works). In HTML templates the if (...): ... endif; syntax is also used.

Si ta mendosh

Si semafori: e kuqe, e verdhë, ose e gjelbër.

Lexoje në anglisht

Like a traffic light: red, amber or green.

Shembull kodiphp

if ($nota >= 9) {
    echo "Shkëlqyeshëm";
} elseif ($nota >= 5) {
    echo "Kalues";
} else { echo "Mbetës"; }

Terma të lidhur