My variables are getting mixed up --RESOLVED (I'm an idiot)

    Date: 02/14/10 (PHP Community)    Keywords: no keywords

    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;

    Source: https://php.livejournal.com/676671.html

« Hmm... || Do x to items 1-7, then y... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home