Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7898905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:33:43+00:00 2026-06-03T08:33:43+00:00

I running a PHp script to present a table on the database, but i

  • 0

I running a PHp script to present a table on the database, but i get the error
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in

The line below is query line

echo "<td><img src='" .$row['ImageURL'] ."' style='width: 200px; height: 150px;' />."-".$row['Name'] ."</td>"";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:33:44+00:00Added an answer on June 3, 2026 at 8:33 am

    You have an unnecessary and faulty concatenation after /> and an extra quote on the end:

    echo "<td><img src='" .$row['ImageURL'] ."' style='width: 200px; height: 150px;' /> -".$row['Name'] ."</td>";
    //-------------------------------------------------------------------------------^^^^--------------------^^^
    //-----------------------------------------------------------Remove dot and quote---------------Remove quote
    

    The whole thing is better done without concatenations in a double-quoted string. Wrap the array elements in {}.

     echo "<td><img src='{$row['ImageURL']}' style='width: 200px; height: 150px;' /> - {$row['Name']} </td>";
    

    However, you probably ought to be sure you have escaped these for HTML output with htmlspecialchars():

    $imgurl = htmlspecialchars($row['ImageURL'], ENT_QUOTES);
    $name = htmlspecialchars($row['Name']);
    echo "<td><img src='$imageurl' style='width: 200px; height: 150px;' /> - $name </td>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running a PHP script that queries the database and then sends
I'm running a cronjob that calls a php script. I get failed to open
I'm running a php script from the command line against SQL server 2005 using
I have a PHP script running on XAMPP in Windows XP that will open
I am working on a site that require a php script running on a
I have a php script that is running in CLI and I want to
I have a PHP script with infinite loop. I need this script running forever.
say a ruby script is running ruby.rb SOMEUSERID using PHP, how can i find
I have a long running php script which is basically an infinite loop listening
I have a PHP script that is running and I sometimes just want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.