|
PHp
|
|
02-25-2010, 06:45 AM
Post: #1
|
|||
|
|||
|
PHp
How can i Sort Multidimensional array using PHP??
|
|||
|
03-02-2010, 06:17 AM
Post: #2
|
|||
|
|||
|
RE: PHp
hi,
An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several different uses; it can be treated as an array, list (vector), hash table (an implementation of a map), dictionary, collection, stack, queue, and probably more. As array values can be other arrays, trees and multidimensional arrays are also possible. .......................................................................................... Web designing Chennai | Website development company Chennai | Graphic designing companies Chennai |
|||
|
03-04-2010, 01:38 PM
Post: #3
|
|||
|
|||
|
RE: PHp
Life is a series of improbable events Altro Enterprises |
|||
|
03-09-2010, 05:59 AM
Post: #4
|
|||
|
|||
|
RE: PHp
Thank u so much for your sharing i got it
|
|||
|
05-13-2010, 03:51 AM
Post: #5
|
|||
|
|||
|
RE: PHp
Using the following code we can sort multidimentinal array in php
<?php // demo array to sort $latest_array = array( array('news','1234567890','sdf','asdpojq'), array('news','1234567892','uruy','xbuqiwpo'), array('comment','1234567893','fghj','mjktyu'), array('article','1234567891','cvmo','pjklgg'), array('news','1234567894','qwenb','asbhtyhj'), ); $sort_field = 3; // enter the number of field to sort // compare function function cmpi($a, $b) { global $sort_field; return strcmp($a[$sort_field], $b[$sort_field]); } // do the array sorting usort($latest_array, 'cmpi'); // demo output echo '<pre>'; print_r($latest_array); echo '</pre>'; ?> sweatshirts | glass teaware | housewarming gifts |
|||
|
05-27-2010, 12:49 AM
Post: #6
|
|||
|
|||
|
RE: PHp
PHP is a powerful tool for making dynamic and interactive Web pages.
PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP. In our PHP tutorial you will learn about PHP, and how to execute scripts on your server. ___________________________________ Whey Protein Protein Supplements |
|||
|
07-08-2010, 11:41 PM
Post: #7
|
|||
|
|||
|
RE: PHp
PHP identify how to evaluate two numbers or two text strings, but in a multidimensional array, each element is an array. PHP provides many utility to sort an array.
No Fee Work at Home | Data Entry | Work from home |
|||
|
02-07-2011, 03:04 AM
Post: #8
|
|||
|
|||
|
RE: PHp
Hi,
Once the PHP array can store all information (strings, numbers, objects, arrays, boolean). We use an array to save the text (string). Tables store data using a key - on a subscription basis. Key is the place we saved the text string. The value is the actual text that we want to keep. Thanks. Web Development India || Indian Web Developers |
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help
Invite
Contact




