php error - array_multisort
<p>Suddenly i got this error show in my index page no changes happen at all and was working for months , </p>

<p>PS : my live site : sudanesetweeps.com</p>

<p><code>array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag in</code></p>

<p><code>Warning: Invalid argument supplied for foreach() in</code></p>

<p>am using the following  code :</p>

<pre><code>&lt;?php

require_once("dbconnect.php");
$query = " SELECT COUNT( * ) cnt, hashtags
FROM  tweets
WHERE tweeted_at &gt; DATE_SUB( NOW( ) , INTERVAL 1 DAY ) 
AND hashtags !=  '' 
GROUP BY hashtags
ORDER BY cnt DESC ";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res) ) {
 $count = $row['cnt'];
$hashtags = explode( " ", $row['hashtags'] );
foreach($hashtags as $hashtag ) {   
 //$index = array_search($hashtag, array_keys($topics));
    if( strtolower($hashtag) != 'gmaes' &amp;&amp; strtolower($hashtag) != 'lord'      ) 
        $topics[strtolower($hashtag)] += $count;
  }
 }

 array_multisort($topics, SORT_DESC);

 echo "&lt;ul id='mytags'&gt;";
 $index = 0;
  foreach($topics as $key=&gt;$value) {
$index++;
if($key != "" ) {       
            $trending[$key] = $value;
            echo "&lt;li&gt;&lt;a class='size".$index."'      href='http://twitter.com/#!/search/realtime/%23".$key."'&gt;#".$key."&lt;/a&gt;&lt;/li&gt;";
   }
  if($index &gt;6 ) 
  break;    
}
 echo "&lt;/ul&gt;";

 ?&gt;
</code></pre>
