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

  • Home
  • SEARCH
  • 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 6347159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:09:27+00:00 2026-05-24T21:09:27+00:00

I have problem with my HTML code inside the echo. This is my code:

  • 0

I have problem with my HTML code inside the echo. This is my code:

echo "<tr><td class=\"desc\">
                            <div class=\"tit\">
                                <img class=\"unit u".$i."\" src=\"img/x.gif\" alt=\"".$unit_name."\" title=\"".$unit_name."\" />
                                <a href=\"#\" onClick=\"return Popup(".$i.",1);\">".$unit_name."</a>
                            </div>
                            <div class=\"details\">
                                <img class=\"r1\" src=\"img/x.gif\" alt=\"".$lang['resources']['Lumber']."\" title=\"".$lang['resources']['Lumber']."\" />".${'bs'.$i}['wood']."|
                                <img class=\"r2\" src=\"img/x.gif\" alt=\"".$lang['resources']['Clay']."\" title=\"".$lang['resources']['Clay']."\" />".${'bs'.$i}['clay']."|
                                <img class=\"r3\" src=\"img/x.gif\" alt=\"".$lang['resources']['Iron']."\" title=\"".$lang['resources']['Iron']."\" />".${'bs'.$i}['iron']."|
                                <img class=\"r4\" src=\"img/x.gif\" alt=\"".$lang['resources']['Crop']."\" title=\"".$lang['resources']['Crop']."\" />".${'bs'.$i}['crop']."|
                                <img class=\"clock\" src=\"img/x.gif\" alt=\"".$lang['gameplay']['duration']."\" title=\"".$lang['gameplay']['duration']."\" />";

Now i have a problem that if I put those <img class things in each line, get space after | but if I put them in same line like <img class>|<img class> than no white space between them.

So actually my result looks like this:

Lumber21312| Clay21312| Iron2312| Crop2132| 

I want it look like this:

Lumber21312|Clay21312|Iron2312|Crop2132|

Sorry if I wasn’t so clear :$

  • 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-05-24T21:09:30+00:00Added an answer on May 24, 2026 at 9:09 pm

    Echo it out like

    "<img />".
    "|".
    "<img />".
    

    etc. Then you can put as much whitespace in there as you want, and it won’t render.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this html code <html> <head> <title>JQuery Problem 2</title> <script type=text/javascript src=jquery-1.4.min.js></script> <script
i have a problem with loading .html pages (with JavaScript inside) into a div
I have a problem where I have some html like this <p>There is the
I have a HTML table with a column per row with this html code
I have a code like this one: $('div.widgetDroppable').droppable({ accept: 'li.widget', drop: function(event, ui) {
I have the following html code. It works when using one H tag inside
I have this code: $(document).ready( function () { $(.userPic).mouseover(function () { $(.changePic img).css(display, block);
I have this PHP code I am trying to integrate with the html layout
I have a strange problem working with HTML,CSS in different browsers: Firefox 3.6 and
I have a problem with rendering my html page by the same browsers in

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.