in_array()

From: Date: Thu, 22 Aug 2002 10:06:52 +0000
Subject: in_array()
Groups: php.general 
Request: Send a blank email to php-general+get-113602@lists.php.net to get a copy of this message
Hi every1 I got this script that works fine on my local windows pc but on the remote server (FreeBSD) I get this message: Warning: Wrong datatype for first argument in call to in_array in /usr/local/...... the script should bookmark an user choice storing it in the $_SESSION["bkmks"] array. this is the code:
$rty->mark($id,$tab);                           // call to the method that perform a standard query on the db
           if(mysql_num_rows($rty->resu))  {     //result
               $rec = mysql_fetch_array($rty->resu);
                        if(!isset($_SESSION["bkmks"]) || !in_array($rec, $_SESSION["bkmks"])) {
                                   $_SESSION["bkmks"][] = $rec;
when I store for the first time no problem ... When I try to store another item or the same item again I got that awful error thanks in advance !
                                                                                                      Ricky


« previous php.general (#113602) next »