My variables are getting mixed up --RESOLVED (I'm an idiot)
If I run the the code below, I get an unexpected result.
I would expect
Camping
Nation
First
33
32
31
32
32
31
Instead I get:---and I don't understand why. Anyone able to help?
Camping
Camping
Camping
33
32
31
32
31
30
--------------------------------- code snippet below ------------------------------
$SixPM_form = "Camping";
$SevenPM_form = "Nation";
$EightPM_form = "First";
$CampingSixPM = "33";
$CampingSevenPM = "32";
$CampingEightPM = "31";
if ($SixPM_form = "Camping")
{
$UpdateCampingSixPM = ($CampingSixPM - 1);
}
if ($SevenPM_form = "Camping")
{$UpdateCampingSevenPM = ($CampingSevenPM - 1);
}
if ($EightPM_form = "Camping")
{
$UpdateCampingEightPM = ($CampingEightPM - 1);
}
echo $SixPM_form;
echo $SevenPM_form;
echo $EightPM_form;
echo $CampingSixPM;
echo $CampingSevenPM;
echo $CampingEightPM;
echo $UpdateCampingSixPM;
echo $UpdateCampingSevenPM;
echo $UpdateCampingEightPM;
I would expect
Camping
Nation
First
33
32
31
32
32
31
Instead I get:---and I don't understand why. Anyone able to help?
Camping
Camping
Camping
33
32
31
32
31
30
--------------------------------- code snippet below ------------------------------
$SixPM_form = "Camping";
$SevenPM_form = "Nation";
$EightPM_form = "First";
$CampingSixPM = "33";
$CampingSevenPM = "32";
$CampingEightPM = "31";
if ($SixPM_form = "Camping")
{
$UpdateCampingSixPM = ($CampingSixPM - 1);
}
if ($SevenPM_form = "Camping")
{$UpdateCampingSevenPM = ($CampingSevenPM - 1);
}
if ($EightPM_form = "Camping")
{
$UpdateCampingEightPM = ($CampingEightPM - 1);
}
echo $SixPM_form;
echo $SevenPM_form;
echo $EightPM_form;
echo $CampingSixPM;
echo $CampingSevenPM;
echo $CampingEightPM;
echo $UpdateCampingSixPM;
echo $UpdateCampingSevenPM;
echo $UpdateCampingEightPM;
