Error Array to string conversion

Hi,
I have a php method with 2 parameters
like this

sc_lookup(pin,“select id_member from member_hp where hp = '”.$member."’");
$idpin = {pin[0][0]};
sc_lookup(pin2,“select pin from member where idmember = '”.$idpin."’");
$pinb = {pin2[0][0]};
if($pin == $pinb) return 1;
else return 0;

the variable parameter is $member and $pin

which would be asked,
why the variable $pin can not work and display a description of the error “Error Array to string conversion”
anyone can help ?

I think that problem is you use pin in first lookup and you have a parameter $pin. Try change the partameter $pin for for other varriable.

ok thanks @alvagar
meaning there are several possible use of existing variables that must be adjusted