We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    <?php
    $output = "";
    if (isset($specific)) {
    $output .= ’<a href="#" onclick="openWindow(’/viewer/item?data=’.$chunk.’’, 710, 500); return false;">’.$name.’</a>*’;
    } else {
    $output .= ’<a href="#" onclick="openWindow(’/viewer/item?data=’.$chunk.’’, 710, 500); return false;">’.$name.’</a>’;
    }

    return $output;
    ?>

    ...which gives this error...

    Parse error: syntax error, unexpected ’=’ in /hsphere/local/home/symphoni/symphonicheaven.com/manager/includes/document.parser.class.inc.php(769) : eval()’d code on line 4

    It’s reading in the = literally. How do I fix it?

    (If you wondering, I’m making a "tag", so I don’t have to retype the HTML code each time I use it.)

    EDIT: Nvm, I found a solution. smiley
      My Snippets
      -> PopUpChunk v1.0
      • 5340
      • 1,624 Posts
      It’s because you are mixing " with ’

      Remove the ’ from onclick. You can use a variable
        • 28033
        • 925 Posts
        The ’ before onclick had to be there (JavaScript). I did get it to work by putting a \ before the ’ containers. smiley
          My Snippets
          -> PopUpChunk v1.0
          • 5340
          • 1,624 Posts
          I forgot about escaping smiley
          Sometimes I just create the string in a separate variable and appended it.