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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:39:12+00:00 2026-06-17T18:39:12+00:00

I want get the results of mysql_fetch_assoc as an array then echo a specific

  • 0

I want get the results of mysql_fetch_assoc as an array then echo a specific value in that array. How do I do that? I tried

$d = array();
while($row_dates = mysql_fetch_array($date_result)){
$d[] = $row_dates;
}

echo $d[1];// this would be the result from the first row
echo $d[3];// this should be the result from the second row.

I’m just getting Array as a result.

  • 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-17T18:39:14+00:00Added an answer on June 17, 2026 at 6:39 pm

    use the below code

    $d = array();
    while($row_dates = mysql_fetch_array($date_result)){
        $d[] = $row_dates['your_column_name'];
    }
    

    you just miss the column_name in your code, everything else in your code is fine.

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

Sidebar

Related Questions

I want to get randomized results for a query. I read that using RAND()
I want to get a list of files and then read the results into
I want to get results from sparql query and the results contain no namespace.
I want to get the results: parent1 : child1 child1 child1 parent2 : child2
I get several results with the same outputs. I want to get jack,jane only
I have a database with >100K records and I want to get the results
I want to get exception of page load, but still have not results on
Results are in clean files. I want to get them to latex-table format with
What am I doing wrong here. I want the array we get at first
I want to loop through the MySQL results which is an array of Freebase

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.