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?
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:-
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