Line 1 <?php
Line 2 echo "<head>
Line 3<META http-equiv=Content-Type content="text/html; charset=iso-8859-9"> \n";
Line 4<link type="text/css" rel="stylesheet" href="tools/style.css" />"; \
Line 5echo "<style type="text/css">";
Line 6echo "<!--

--

Please help me resolve this.

    Your problem is that you've got unescaped double quotes in a double-quote delimited string. If you want a literal double quote to appear, you have to escape it by prepending it with a backslash. See this manual page for examples: [man]string[/man].

    Also, in the future, please post all parse error problems in the stickied thread in the Coding forum entitled Parse Error: syntax error.

      Not really... you have double quotes inside of the string you're trying to echo. The string itself is delimited by double quotes. As such, if you want a literal double quote to appear in the string and not be parsed as the ending delimiter, then you have to escape that double quote with a backslash.

      Again, the PHP manual page I linked to above has examples. Here's the relevant one:

      // Outputs: Arnold once said: "I'll be back"
      echo 'Arnold once said: "I\'ll be back"';

      Because the string was delimited by single quotes, the single quote in I'll had to be escaped with a backslash. The same is true in your coding snippet, the only difference being that you used double quotes to delimit the string rather than single quotes.

      Now that I look at your code, you also have another problem:

      <?php
      echo "<head>
      <META http-equiv=Content-Type content="text/html; charset=iso-8859-9"> \n";
      <link type="text/css" rel="stylesheet" href="tools/style.css" />"; \\
      echo "<style type="text/css">";
      echo "<!--

      The line starting with <link type isn't enclosed in any echo statement, so it'll cause another parse error. Either escape out of PHP mode, or enclose the HTML in that line in an echo statement as well.

        Write a Reply...