Hi Riccardo,
> if(mysql_num_rows($rty->resu)) { //result > $rec = mysql_fetch_array($rty->resu); > if(!isset($_SESSION["bkmks"]) || When you save something for the first time, the element of $_SESSION["bkmks"] is a string and you can compare the array $rec with this string. >!in_array($rec, $_SESSION["bkmks"])) { Than you convert the element into an array > $_SESSION["bkmks"][] = $rec; and AFAIK in_array() canīt compare two arrays, correct me if i am wrong... Greetings Jochen *********** REPLY SEPARATOR *********** On 22.08.02 at 12:06 Riccardo Sepe wrote: >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 > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php