I have a database table Users with an id column “uid” and an email column “email”. I am executing this line of code:
$user = $this->User->findByEmail($this->data['User']['email']);
Where $this->data['User']['email'] is unquestionably returning the correct email address and this email address is in the database table. However, the result of:
echo "User is :" . $user = User is: Array
I need to know how to get the value of the id out of this array.
Any advice is appreciated.
Regards.
try
$user[0]orprint_r($user)