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 6104765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:52:45+00:00 2026-05-23T13:52:45+00:00

This might sound like a silly question but how would I make this code

  • 0

This might sound like a silly question but how would I make this code seem…neater?

    echo "<h3><font face='helvetica'><font size='4'><b><font color='B80000'>$title</font></font></font></b> <font color='A0A0A0'>$category &nbsp;</font><font color='A0A0A0'><a href='profile.php?id=$userid'>$user</a></font>
    <font face='helvetica'><font size='3'><br>&nbsp;$desc</font></font><br>

       <h3><font color='101010'> &nbsp;$city,$state&nbsp;$zip&nbsp;<font color='A0A0A0'>$date</font>  </font></h3>";
?>

There’s nothing wrong with the code but it looks so sloppy – I was wondering if someone could help me out with making it look neat and tidy

  • 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-23T13:52:45+00:00Added an answer on May 23, 2026 at 1:52 pm
    1. Don’t use <font> – move those rules to CSS, where you can style the <h3> element. Also! Not all computers have Helvetica, so you may want to change that to "Helvetica", Arial; so the design stays somewhat inline with your intent.
    2. Stay away from using <h3> twice – put the second h3 into a <p> or something similar, and use CSS to style that.
    3. &nbsp;$city,$state&nbsp;$zip&nbsp; is dirty – concatenate the string with spaces in PHP, then echo the string.
    4. Instead of using echo to output the PHP, just use echo inside of the HTML for the certain elements – this will make it much more readable.
    5. Use htmlspecialchars() on every piece of data that comes out of a database before you echo it to the page. This prevents invalid HTML and XSS vulnerabilities.

    That should tighten it up!

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

Sidebar

Related Questions

This might sound like a silly question but is there a manual or a
HI, this might sound like a silly question but.. i've created several types in
This might sound like a silly question, but when I search for webservices, I
this might sound like a daft question but I can't seem to find a
This might sound like a bit of a silly question but I been looking
This might sound like a little bit of a crazy question, but how can
This might sound like a stupid question, but google didn't help me. Is there
This might seem like a stupid question I admit. But I'm in a small
Yes, this might sound like a newbie question but there's a TWIST! ( And
This might sound like a strange question, but bear with me... I have a

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.