alienmojo Posted January 31, 2007 Share Posted January 31, 2007 [code]echo "<td>" .<img src="images/'. $row['imagename'] .'" width="400"height="400">."</td>";[/code]basicly im trying to put a pic in a table and im getting an error[quote]Parse error: parse error, unexpected '<' in C:\Documents and Settings\marquis taliaferro\Desktop\web page\results.php on line 211[/quote] Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 You break out of the string after your <td> but don't start a new one. Any text you want to print has to be in the string.Use single quotes in this instance, it'll be easier.echo '<td> <img src="images/'.$row['imagename'].'" width="400" height="400"> </td>'; Quote Link to comment Share on other sites More sharing options...
alienmojo Posted January 31, 2007 Author Share Posted January 31, 2007 thanks that fixed iti need help on one more thing im trying to make reach row on the a linkhere is what i have so far[code]mysql_select_db("realestate", $con);$result = mysql_query($SQL);echo "<table border='5'> <tr> <th>Picture</th> <th>Address</th> <th>Price</th> <th>Baths</th> <th>Bedrooms</th> <th>State</th> <th>City</th> <th>Square Feet</th> <th>County</th> <th>Year Built</th> <th>Buy or Lease</th> </tr>";while($row = mysql_fetch_array($result)) { $accountnum=$row['accountnum']; echo '<a href="descrip.php?accountnum='.$accountnum.'">'; echo "<tr>"; echo '<td> <img src="images/'.$row['imagename'].'" width="75" height="75"> </td>'; echo "<td>" . $row['address'] . "</td>"; echo "<td>" . $row['price'] . "</td>"; echo "<td>" . $row['baths'] . "</td>"; echo "<td>" . $row['bedrooms'] . "</td>"; echo "<td>" . $row['state'] . "</td>"; echo "<td>" . $row['city'] . "</td>"; echo "<td>" . $row['squarefeet'] . "</td>"; echo "<td>" . $row['county'] . "</td>"; echo "<td>" . $row['yearbuilt'] . "</td>"; echo "<td>" . $row['buyorlease'] . "</td>"; echo "</tr>"; echo "</a>"; }echo "</table>";[/code] Quote Link to comment Share on other sites More sharing options...
alienmojo Posted January 31, 2007 Author Share Posted January 31, 2007 as far as error codes i get nothing so there is nothing wrong with the syntax somthing missing my just not sure what Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.