Error with foreach in wordpress function

Discussion in 'PHP' started by bellcom, Apr 23, 2015.

  1. #1
    bellcom, Apr 23, 2015 IP
  2. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #2
    Change the , to a ;
     
    Anveto, Apr 23, 2015 IP
  3. bellcom

    bellcom Well-Known Member

    Messages:
    220
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    120
    #3
    I tried that and and still shows the error in browser & my code editor for that line?
    Parse error: syntax error, unexpected ';' in wp-content/mu-plugins/update-author.php on line 11

    thx!!
     
    bellcom, Apr 23, 2015 IP
  4. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #4
    ah sorry, you want to do a for loop, not foreach
     
    Anveto, Apr 23, 2015 IP
  5. bellcom

    bellcom Well-Known Member

    Messages:
    220
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Thanks for correcting that!
    Code is correct now but I don't think it does what is intended :)
     
    bellcom, Apr 23, 2015 IP