I am sorry for asking this basic level question. I have fetched some data from DataBase and stored it to a variable inside a function, and wanted to get the value of that variable outside the function?
public function getemailData()
{
$email_id_investors = $this->db
->select('value')
->get_where('common_email_settings', ['name' => investors_email])
->row()->value;
}
I wish to get the value of the $email_id_investors outside the function. Again I am apologizing for this basic question
Database table name - common_email_settings
fields are Id, title, name, value
1 Greeting Mail, greeting_email ,[email protected]
2 Loan Service Mail, loan_service_email ,[email protected]
3 Processing Mail, processing_email ,[email protected]
returnit.returnis one of the basic things you learn when you first learn about PHP functions (or functions in almost any programming language, actually). php.net/manual/en/functions.returning-values.php'name' => investors_emailis wrong, either use a variable $investors_email or a string 'investors_email', but not a method name