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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:23:26+00:00 2026-06-05T09:23:26+00:00

I have a MySQL table in which there are two columns , for text

  • 0

I have a MySQL table in which there are two columns , for text and for image separately. But when i retrieve those columns from database and display those on Site page I need to place the Image(from Image Column) at the middle of the paragraph text(which was retrieved from text column ). I have a separate Uploader that upload the image. I am using a text-editor (ckeditor) but it does not let me upload the pics from the computer so I had to do this.

I will Appreciate any suggestion or help.

enter image description here

content Body has the Paragraph Text and img_location has the image url.

  • 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-05T09:23:28+00:00Added an answer on June 5, 2026 at 9:23 am
    <?php
     $conn = mysql_connect("localhost", "username", "password");
      if(!$conn)
      {
    die('Could not connect '.mysql_error());
      }
      mysql_select_db("dbname");
      $res = mysql_query("select * from `tb_name`");
      while($v=mysql_fetch_array($res))
      {
        $name=$v['content_body'];
        $img=$v['img_location'];
        $count=strlen($name);
        for($i=0;$i < $count;$i++)
          {
           if($i == $count/2)
           echo "<img src='".$img."'/>"." ".$name[$i];
           else
           echo $name[$i];
          }
      }
     ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table in MySQL database with two integer columns for example: userid |
I have a mysql table which columns are post_id and post_msg. Now I want
i have a large mysql database table in which one column contains values ranging
So I have a mySQL database with a 'users' table which includes a username,
I have a table in mysql which stores (among other columns) a bitmask as
Should a database table that contains two columns that are foreign keys have a
I have a table Document with a full text index headline_idx on two columns,
i have a table name preferences under this there are multiple columns but i
I have the following problem: In mysql I have a table which contains two
I have a table which has two fields. There can be multiple rows with

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.