Hi Mates,
I want to sort the values in descending order which is stored in a array.when I have only the following integer values then sorting is taking place correctly.But the proble occurs when there is a mixed type.
Lets see
$sum=$sum.”,”.”Monday”.”,”.”Morning”;//$sum=12,Monday,Morning
$sum1=$sum1.”,”.”Tuesday”.”,”.”Morning”;/ /$sum1=14,Monday,Morning
$sum2=$sum2.”,”.”Wednesday”.”,”.”Morning”;//$sum2=11,Monday,Morning
$sumarr=array($sum,$sum1,$sum2);
sort($sumarr);
foreach($sumarr as $key=>$value)
{
//echo “Key: $key; Value: $value<br />n”;
list($h,$d,$ts)=explode(“,”,$value);
}
also please tell me how can i keep $sum.”,”.”Monday”.”,”.”Morning” inside a “”.
that means i want to keep it as
$sum=”$sum.”,”.”Monday”.”,”.”Morning””;//But this is giving error i think its a concatenation problem.
Please suggest me a suitable way.
Thanks in advance for your co-operation.