[Php-it] else if ... Elseif
Giovanni Battista Lenoci
gianiaz at gianiaz.net
Mon Feb 5 16:36:20 CET 2007
Jonathan Stoppani ha scritto:
> Non è vero,
>
> fra
> if {
>
> } else {
> if {
>
> } else {
>
> }
> }
>
> e
>
> if {
>
> } else if {
>
> } else {
>
> }
>
Io avevo fatto questo tipo di distinzione:
fra
if( ) {
} elseif () {
}
e
if() {
} else if() {
}
}
non cambia nulla, ma questa è un'inutilità data dal fatto che il
costrutto if si può usare anche senza graffe se l'istruzione è una sola,
e il secondo blocco if viene visto come tale.
Quello che dicevo io è che con un costrutto
if() {
} elseif {
}
non puoi fare quello che raggiungeresti nell'else #2
if () {
} else if {
} else { #2
}
}
Ciao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gianiaz.vcf
Type: text/x-vcard
Size: 259 bytes
Desc: not available
Url : http://lists.ziobudda.net/pipermail/php-it/attachments/20070205/fe45c78f/gianiaz.vcf
More information about the Php-it
mailing list