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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:35:32+00:00 2026-05-15T08:35:32+00:00

displaying html problem with php & mysql Hi basically i have a quick mysql_fetch_array

  • 0

displaying html problem with php & mysql

Hi basically i have a quick mysql_fetch_array script to display the contents from the db like below:

$sql_select_jobs = $db->query("SELECT * FROM `probid_jobs`");
while ($jobs_found = $db->fetch_array($sql_select_jobs)) {
$template_output .= "<div class=\"listed-jobs\" style=\"border: 1px solid gray; border-bottom: 0px; padding: 20px;\">"; 
$template_output .= "Job Title: " . $jobs_found['job_title'] . "<br />"; 
$template_output .= "Location: " . $jobs_found['location'] . "<br />"; 
$template_output .= "Salary: " . $jobs_found['salary'] . "<br />"; 
$template_output .= "Date Posted: " . $jobs_found['date'] . "<br /><br />"; 
$template_output .= "Description: " . $jobs_found['description'] . "...<a href=\"\">more</a><br />"; 

$template_output .= "</div>";
} 

however the output would look like this:

Job Title: fff
Location: ff
Salary: fff
Date Posted: 18/06/10
Description: <b>fffffffffff <i>fffffffffffffffffff</i><br></b>...more

as you can see the description html from the db isn’t getting formatted as html, for some reason it is getting escaped.

  • 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-15T08:35:33+00:00Added an answer on May 15, 2026 at 8:35 am

    Change the line:

    $template_output .= "Description: " . $jobs_found['description'] . "...<a href=\"\">more</a><br />"; 
    

    with:

    $template_output .= "Description: " . html_entity_decode($jobs_found['description']) . "...<a href=\"\">more</a><br />"; 
    

    More Info:

    http://www.php.net/manual/en/function.html-entity-decode.php

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

Sidebar

Ask A Question

Stats

  • Questions 515k
  • Answers 515k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The speed angle changes when the ball bounces, you should… May 16, 2026 at 6:24 pm
  • Editorial Team
    Editorial Team added an answer You are looking for ShingleFilter. Update: The link points to… May 16, 2026 at 6:24 pm
  • Editorial Team
    Editorial Team added an answer You might want to avoid using := as a placeholder… May 16, 2026 at 6:24 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a mysql database which as one of the fields contains a html
What my script currently does: grabs & cleans a $_GET['id'] pulls all pre-existing data
I'm using PHP to generate an html email which sends my clients latest stats
I've written a PHP script that handles file downloads, determining which file is being
I am currently stuck with this problem of displaying an image using HtmlHelper class.
I have a partial view (ascx) for displaying the top x articles of a
I have a form served in non-UTF-8 (it’s actually in Windows-1251). People, of course,
First of all, the website I run is hosted and I don't have access
I'm trying to port a PHP site developed by another coder (who is no
I have an anchor tag on my page that toggles between active and cancelled

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.