Jump to content

Recommended Posts

 

 

if i wanted to order the array of

$names_array=array("a c b","b a c","a b c");

 

to show in this order.

 

1.abc

2.acb

3.bac

 

what i am trying to to is get the array values in order of a-z

example of array

<?php

$names_array=array("a c b","b a c","a b c");

foreach($names_array as $test_order){

echo "$test_order\n <br>";
}

?>

Link to comment
https://forums.phpfreaks.com/topic/155612-solved-how-to-order-a-array/
Share on other sites

cheers dan,

 

if i wanted to order the array of a database, and order the meta tag of description will that also work with your posted code.

 

what it is dan, i am creating a add link, web site and i want to show all the added web sites in order of a-z of the description name.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.