I\'ve been banging my head onto a wall while trying to get this to work. I cannot provide a working sample code, but here\'s a try so if anyone can tell me what\'s wrong with my attempt, then there\'s the sample for you too, an_goodboy2000.
My problem is that there is something wrong with the array of objects I\'m creating. I get an error message for each tag object in my array saying: \"Warning: Cannot use a scalar value as an array in /home/[removed]/links.php on line 103\"
The line 103 looks like this: $tags[$key][tag_class] = \'tag\'.$bucket_count;
This is my code:
require(\"databaseconnection.php\");
class tag {
var $tag_name;
var $tag_count;
var $tag_class;
}
$tags=array();
$sql = \"SELECT tag, COUNT(tag) as count FROM links_tags GROUP BY tag ORDER BY count\";
$result = mysql_query($sql);
while ($rowInfo = mysql_fetch_assoc($result))
{
$tempTag=new tag();
$tempTag->tag_name = ($rowInfo[\'tag\']);
$tempTag->tag_count = ($rowInfo[\'count\']);
$tags[]=$tempTag;
}
cloud_tags($tags);
Could someone please show me what I\'m doing wrong. Best regards and thanks in advance.