Solved

PHP Parse error: syntax error, unexpected '<' in /var/apache/lindamatthews.net/test/open.php on line 21

Posted on 2014-10-27
3
132 Views
Last Modified: 2014-10-28
I'm getting this error

Parse error: syntax error, unexpected '<' in /var/apache/lindamatthews.net/test/open.php on line 21

But don't see the problem in the code here.pppppppp

<?php
ini_set("display_errors", "On");
error_reporting(E_ALL);

include("header.php");
include("menu.php");
$info=urldecode($_GET["info"]);
$info=explode("%f ", $info);
$c=$_GET["c"];
$r=$_GET["r"];

$row=explode("%i ",$info[$r]);
 
echo "<div class=\"content\">";

echo "<table><tr><td>";
echo "<img id=\"pic\" src=\"",$row[0],"\" style=height:425px><td style=\"width:3%;\">";
echo "<td>",$row[1];
echo "<tr><td>All images copyright Linda Matthews.";
echo "<td><button onclick=\"prevPicture()\"> Previous </button>";
          <button onclick=\"history.go(-1);\"> Thumbnails </button>";
          <button onclick=\"nextPicture()\"> Next </button>";
echo "</table></div>";

include("footer.php");


echo "<script type="text/javascript">"
echo "    function prevPicture() {"
echo "        document.getElementById(\"pic\").src=\"art/zen03.jpg\";";
echo "    }";

echo "   function nextPicture() {"
echo "        document.getElementById(\"pic\").src=\"art/zen04.jpg\";";
echo "    }";
echo "</script>";

Open in new window

0
Comment
Question by:padmasambhava
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40407673
What is line 21?

echo "<img id=\"pic\" src=\"",$row[0],"\" style=height:425px><td style=\"width:3%;\">";

Should be

echo "<img id=\"pic\" src=\"".$row[0]."\" style=height:425px><td style=\"width:3%;\">";
0
 
LVL 58

Expert Comment

by:Gary
ID: 40407674
And
echo "<td>",$row[1];

should be

echo "<td>".$row[1];

Notice its a period not a comma
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 40408325
Just a note... Anytime you see Parse error: syntax error, unexpected... it means something upstream from the noted line number contains the error.  In some cases "upstream" might mean earlier in the same line, but other times it may mean mismatched quotes, curly braces or parentheses several lines above.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Google Maps API and PHP 25 49
Dynamic Dropdowns 15 33
IP 10.0.1.2 / 255.0.0.0 61 56
How to extract database info from current month and year 7 13
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question