Help with parse error

Discussion in 'PHP' started by Drago13, Aug 20, 2009.

  1. #1
    I am having an error with one of my forum threads. Any help would be greatly apreciated.

    error: Parse error: syntax error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /blah/blah/public_html/blah/blah/ame_bbcode.php(869) : eval()'d code on line 1

    here is line 869 of the code :

    eval('$ameinfo[\'code'\] = "' . ame_slasher($code, false) . '";');

    I have limited basic PHP knowledge, I tried a few things , but nothing worked. Thanks again.
    P.S. I am glad I found this site. This site is great, I will definitely be visiting more often.
     
    Drago13, Aug 20, 2009 IP
  2. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    backslash needs to be before the quote


    eval('$ameinfo[\'code\'] = "' . ame_slasher($code, false) . '";');
     
    Kyosys, Aug 20, 2009 IP
  3. Drago13

    Drago13 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I am sorry . I must have posted a line that I was playing with. Thanks for the quick response. Here is the actual line 869 of code that is causing the problem.

    eval('$ameinfo[\'code\'] = "' . ame_slasher($code, false) . '";');

    Again any help would be greatly appreciated..
     
    Drago13, Aug 20, 2009 IP
  4. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    same error? Seems right to me
     
    Kyosys, Aug 20, 2009 IP
  5. Drago13

    Drago13 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes , it seems to be happening on that thread only. When I try to open it up, I get that error. I would just delete that thread , but it has alot of info on it I would like to keep. :(
     
    Drago13, Aug 20, 2009 IP
  6. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Are you sure it's not like a cache thing? Try refreshing
     
    Kyosys, Aug 20, 2009 IP
  7. Drago13

    Drago13 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yeah i tried that too... what a pain.. I am figuring it is something in the thread that causing the problem. but i cant open it cause of then error to see what it is.:confused:
     
    Drago13, Aug 20, 2009 IP
  8. kidd87

    kidd87 Greenhorn

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #8
    you still getting the error ?
     
    kidd87, Aug 20, 2009 IP
  9. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I don't see the reason why you are even using eval?

    Try

    
    $ameinfo['code'] = ame_slasher($code, false);
    
    PHP:
     
    premiumscripts, Aug 20, 2009 IP
  10. Drago13

    Drago13 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Awesome. Worked like a charm. Thanks a million.:D
     
    Drago13, Aug 21, 2009 IP
  11. Ultimate_coder

    Ultimate_coder Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Read it carefully and check all codes line by line use adobe dreamweaver to adoiv the simpliest mistakes
     
    Ultimate_coder, Aug 21, 2009 IP