How do I get only email from this array in same method to pass as variable for the model?
$user_data['userinfo'] = $this->logindatamodel->login_data();
$tsp = $this->AttendanceModel->get_batch_byUser();
echo '<pre>';
print_r($user_data);
Output:
Array
(
[userinfo] => stdClass Object
(
[ID] => 3
[Name] => Md. Aminur Rahman
[Email] => [email protected]
[Password] => 202cb962ac59075b964b07152d234b70
[Role] => 4
)
)