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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:31:45+00:00 2026-06-05T14:31:45+00:00

Its a very simple question ! I execute a select query in mysql and

  • 0

Its a very simple question !
I execute a select query in mysql and I have result as an array.
I only need to print some of values and not the whole array.
What is the best way to do that ?

echo $row['id']['range']['name]';

only print id.

Also I need to have them in a good format.

Like :
Id range name

And please help me on my second question
How can I separate the result of this code in a good format (in this case it print 3 string) :

while($row= mysql_fetch_assoc($result)) {
 echo $row['name'];
}
  • 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-05T14:31:47+00:00Added an answer on June 5, 2026 at 2:31 pm

    Formatting will be done by outputting the html you want to use. The example below uses the paragraph tag. You cannot simply stick array keys together like that to reference multiple elements. That syntax is for delving down into multidimensional arrays.

    while($row= mysql_fetch_assoc($result)) {
      echo '<p>';
      echo $row['id'];
      echo ' ';
      echo $row['range'];
      echo ' ';
      echo $row['name'];
      echo '</p>';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very simple question this time, basically I have a group of folders and some
I have written a very simple control. C# Visual Studio 2008. Its output should
i have a very simple question. i searched for it everywhere but i didn't
Its very simple question, I'm new to this and I can't understand the problem
This is probably a very simple question but I have a confusion about the
I guess this is a quite simple (read: very simple) question, but I have
I have a very simple question.. I am using the following code to edit
This is a very simple question. I have a Html.helper: @Html.DisplayFor(modelItem => item.Text) How
I have few very simple question. I searched a web for them, but I
im very sorry to ask a very simple question, its seems im not understanding

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.