Hey guys,
I have 2 almost equal function but one of then gives me an error and i really dont know why 🙁
Here are the 2 functions :
This one he does ok :
function cato() {
global $description;
$sql = mysql_query("select * from file_cat order by cat_id asc"); # De query word gemaakt
while($row = mysql_fetch_array($sql))
{ # Hier worden alle waardes aan de variablen gekoppeld
$cat_id = $row['cat_id'];
$cat_name = $row['cat_name'];
$cat_desc = $row['cat_desc'];
$sql2 = mysql_query("select * from file_specs where cat_id='$cat_id'");
$aantalfiles = mysql_num_rows($sql2);
$catogories = ("<BR> <strong><img src=\"images/arrow.gif\" width=\"9\" height=\"11\"><a href=\"index.php?event=cat&cat=$cat_id\">$cat_name</strong><br>
- $cat_desc<BR>
- aantal files : $aantalfiles<br></a>");
$description["catogories"] .= $catogories;
} # Einde while loop
display_template('catogories'); # Shows the catagories
unset ($description["catogories"]);
} # einde function
And this one gives me an error :
function nieuwstefiles() {
global $description;
$sql = mysql_query("select * from file_specs order by fid asc"); # De query word gemaakt
while($row = mysql_fetch_array($sql))
{
# Hier worden alle waardes aan de variablen gekoppeld
$fid = $row['fid'];
$size = $row['size'];
$name = $row['name'];
$description = $row['description'];
$date = $row['date'];
$hits = $row['hits'];
$rating = 75;
$files = "<strong><img src=\"images/arrow.gif\" width=\"9\" height=\"11\">
<a href=\"$PHP_SELF?event=file&id=$fid\" onMouseOver=\"drc('<strong>Desctiption : </strong>$description<BR><strong>Size : </strong>$size<BR><strong>Date : </strong>$date<BR><strong>Hits : </strong>$hits<BR><strong>Rating : </strong>$rating <BR>','$name','<img src=images/dl_button2.gif>');\" onMouseOut=\"nd();\">
$name<br></strong> - posted on : $date</a><br><BR>";
$description["files"] .= $files;
} # Einde while loop
display_template('newfiles'); # Shows the catagories
unset ($description["files"]);
} # einde function
This is the error i get fot his function :
Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in c:\apache\util\download_system\functions.php on line 145
This error reffers to this line in the second funtion :
$description["files"] .= $files;
Do u guys know what i am doing wrong???
Any help appreciated 😃
Vinnie