I am getting the error:
Function name must be a string on this code:
$profile_data = $user_data('first_name','last_name','email');
Any ideas why this could be?
I am getting the error:
Function name must be a string on this code:
$profile_data = $user_data('first_name','last_name','email');
Any ideas why this could be?
While you can use variables as function-names, to do so requires the variable to be a string.
The variable $user_data
sounds more like an array, or even possibly an object. If this is true, you will receive the error specified. Per the comment from @Jon, it could also be possible that user_data()
is a method and the $
is a typo.
If none-of-the-above helps, please all relevant code, specifically the creation of the $user_data
variable (or a var_dump($user_data)
output).