Declaring multiple variables simultaneously
Posted: Fri Mar 06, 2009 2:23 pm
i'm migrating from PERL to PHP today, so i'm new at this. I've searched all over and didn't find an answer.
I would like to declare two variables simultaneously. In PERL we do like this:
It would be the same as:
But i'm having a hard time reproducing it in PHP. Is it possible? Thanks in advance. :)
I would like to declare two variables simultaneously. In PERL we do like this:
Code: Select all
($variable1, $variable2) = ("First Value", "Second Value");Code: Select all
$variable1 = "First Value";
$variable2 = "Second Value";