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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:21:59+00:00 2026-05-18T20:21:59+00:00

HI GEEKS I am working in PHP and Mysql. I have an array from

  • 0

HI GEEKS

I am working in PHP and Mysql.
I have an array from database, in which I get the values if field name of a form i.e., Name, Company Name, etc. There are lots of field in the array.

I want these field to be displayed in my desired sequence, likewise:

Name:
Company Name:
Date of Birth:
Address:

These values are available in array in unordered format likewise:

array(
       Company Name,
       Address,
       Date Of Birth,
       Name
     )

Now my question is how can manipulate this array to get the desired sequence in display of fields as shown above in PHP?

  • 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-18T20:22:00+00:00Added an answer on May 18, 2026 at 8:22 pm

    I think the better way is you should print them as you need instead of doing sorting on array based on custom desire something like:-

    echo $array['Name'];
    echo $array['Company Name'];
    

    and so on
    OR

    if the fields are dynamic and edited by admin then you have to add one more field in your mysql database and store the order number of all the fields by which value to be printed on page.

    Thanks

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

Sidebar

Related Questions

I have created a PHP script and I am lacking to extract the primary
So I'm a coder, I do PHP, JavaScript, and Objective-C. I'm currently working on
I'm working on a typical internal web/database app for a large corporation. By typical,
I have a msi created for a project which uses C# & Jscript. version-1.0
If we are going to develop a community website for non geeks, is it
As that web-standards geek I am, I dislike the default <form runat=server> that surrounds
I'm working in a small development group. We are building and improving our product.
Working for a considerable time on cracking some sales data, I came across an
You see a fair bit (in the Geek community anyway) about OpenID. It seems
I work for a smallish software shop with a mix of internal products, and

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.