Welcome Guest, Not a member yet? Register   Sign In
Problem With Sorting array
#2

If you assign key/value pairs to an array, the comma is used to separate the pairs. The keynames must be strings. If you need numeric values with decimals, use a dot, not a comma.

E.g.:
$myArray = array(
'10'=>12.7,
'4'=>7
);

Will result in :
$myArray[10] => 12.7
$myArray[4] => 7
Reply


Messages In This Thread
Problem With Sorting array - by Chandini - 02-09-2016, 06:40 AM
RE: Problem With Sorting array - by Wouter60 - 02-09-2016, 12:55 PM
RE: Problem With Sorting array - by siburny - 02-09-2016, 02:34 PM
RE: Problem With Sorting array - by Chandini - 02-09-2016, 09:53 PM
RE: Problem With Sorting array - by Wouter60 - 02-09-2016, 11:16 PM
RE: Problem With Sorting array - by Chandini - 02-10-2016, 12:18 AM
RE: Problem With Sorting array - by Diederik - 02-10-2016, 05:03 AM
RE: Problem With Sorting array - by siburny - 02-10-2016, 10:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB