Jump to content

array_merge help please - confused


jokerfool

Recommended Posts

I am getting this error and I don't know what it means, the script has no support behind it so I have come here, can someone tell me what this means please:

 

[02-Jan-2009 11:45:31] PHP Warning:  array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home//includes/load_category.php on line 26

 

The line 26 refers to this line:

 

$en = array_merge($en,$line);

 

The line 26 is made up of this section:

 

//Find Category
        $parent = 0;
        $url = '';
        $path = '<a class=title_links href="'.constant('dir').'">'._home.'</a>';

        while (count($cats) > 0) {
                $cat = array_shift($cats);
                $result = mysql_query("SELECT * FROM $catstable WHERE c_parent=$parent AND c_url='".$cat."'") or die(mysql_error());
                $line = mysql_fetch_assoc($result);
                $en = array_merge($en,$line);
                if (mysql_num_rows($result) == 0) call404();
                $parent = $line[c_id];
                $url .= '/'.$line[c_url];
                if (substr($url,0,1) == '/') $url = substr($url,1);
                $path .= ' : <a class=title_links href="'.constant('dir').$url.'">'.$line[c_name].'</a>';
                }

 

Thank you.

Link to comment
Share on other sites

Whilst I wait for the errors to appear there I am getting another error elsewhere, same array message:

 

PHP Warning:  array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home/admin/includes/manage_members.php on line 257

 

The line refers too:

 

$ll = mysql_fetch_assoc($res); $line = array_merge($line,$ll);

 

That section refers too this:

 

//$line = mysql_fetch_array($result,MYSQL_ASSOC);
//foreach ($line as $key=>$value) echo $key.'='.$value.'<br>';


while ($line = mysql_fetch_array($result,MYSQL_ASSOC))
   if (++$npk >=$from && $npk<=$to) {

        $res = mysql_query("SELECT COUNT(l_id) AS listings FROM $linktable WHERE l_member=$line[$rid]") or die(mysql_error());
        $ll = mysql_fetch_assoc($res); 

	if (is_Array($ll)) {
		$line = array_merge($line,$ll);
	}

        $res = mysql_query("SELECT COUNT(r_id) AS reviews FROM $reviewtable WHERE r_member=$line[$rid]") or die(mysql_error());
        $ll = mysql_fetch_assoc($res); $line = array_merge($line,$ll);

        $res = mysql_query("SELECT COUNT(log_user) AS logins FROM $logstable WHERE log_user=$line[$rid]") or die(mysql_error());
        $ll = mysql_fetch_assoc($res); $line = array_merge($line,$ll);
        $res = mysql_query("SELECT log_time AS lastlog, log_ip AS lastip FROM $logstable WHERE log_user=$line[$rid] ORDER BY log_time DESC LIMIT 1") or die(mysql_error());
        $ll = mysql_fetch_assoc($res); $line = array_merge($line,$ll);

 

Thank you.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.