debug

Discussion in 'PHP' started by talker1, Jun 29, 2010.

  1. #1
    what is error on this code?

    if ($gravity == 'northwest')
    {
    $return[0] = 0;
    $return[1] = 0;
    if ($margin)
    {
    $return += 0 = $margin;
    $return += 1 = $margin;
    }
    }
     
    talker1, Jun 29, 2010 IP
  2. Michellu

    Michellu Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Your problem is here:
    
    $return += 0 = $margin;
    $return += 1 = $margin;
    
    PHP:
    But I cannot figure out what are you trying to do? Explain it in words so we can help you further.
     
    Michellu, Jun 29, 2010 IP
  3. talker1

    talker1 Active Member

    Messages:
    160
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    this is a file decoded from base64 i have replaced:

    $return += 0 = $margin;

    to

    $return + $margin == 0;

    but script isnr working :(
     
    talker1, Jun 29, 2010 IP
  4. imperialDirectory

    imperialDirectory Peon

    Messages:
    395
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here's your error code:
    Parse error: syntax error, unexpected '='

    There are couple ways to re-parse the last part of the code.
    But without knowing what you are trying to accomplish, its hard to guess which one is the right one
     
    imperialDirectory, Jun 29, 2010 IP
  5. creativeGenius

    creativeGenius Well-Known Member

    Messages:
    273
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    120
    #5
    the code pointed above does not make sense, it could be a conditional statement of some sort
     
    creativeGenius, Jun 29, 2010 IP