vendredi 5 avril 2019

I want to add value to multiple variable If condition shorthand

I want to add value to multiple variable If condition shorthand but I don't know how to use symbol split between 2 variable

eg. manuscript

if(condition) {
    $var1 = "a";
    $var2 = "b";
} else {
    $var1 = "";
    $var2 = "";
}

Shorthand [error]

(condition) ? $var1 = "a", $var2 = "b"
: $var1 = "", $var2 = "";

Aucun commentaire:

Enregistrer un commentaire