i am new to php , i am running in to problem, i have to pass an array as an argument in php function , when i am doing this i am getting array to string error .could you guys help me??
This is the helper function:
private function userinfo($info,$args=''){
try{
if($args===''){
return $this->user->authenticate($this->username,$this->pswd,$info);
}
return $this->user->authenticate($this->username,$this->pswd,$info,$args);
}catch(exception $e){
}
}
this is the add function called :
public function addUser($id,$email,$name){
$this->userinfo('add',array(0=>$id,1=>$email,2=>$name));
}