ksort krazyness
Posted: Wed Aug 10, 2005 4:44 am
i have array that looks exactally like this
then i run this code
finish is the array above. when i print_r($ok) i get "1" thats it nothing else just the number 1. why?
EDIT: note, this is where $finish comes from
Code: Select all
Array
(
[4] => Patch
[5] => Report
[12] => the
[15] => of
[17] => loss
[6] => is
[10] => deals
[1] => Weight
[13] => different
[7] => a
[0] => The
[16] => weight
[18] => patches,
[19] => obviously.
[2] => Loss
[3] => Diet
[14] => types
[8] => report
[9] => that
[11] => with
)Code: Select all
$ok = ksort($finish);
echo '<pre>';
print_r($ok);
echo '</pre>';EDIT: note, this is where $finish comes from
Code: Select all
$finish = $newlinesarr + $arrlines;
//so the whole part looks like
$finish = $newlinesarr + $arrlines;
echo '<pre>';
print_r($finish);
echo '</pre>';
$ok = ksort($finish);
echo '<pre>';
print_r($ok);
echo '</pre>';