function lastfm_entity_update($entity, $type){
if (isset($type)) && (entity_get_info($type) == 'subject') {
};
};
I want to check if type exists and if the type is equal to subject, but the code is giving a syntax error.
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think that the problem is not the “&&” operator, but your parentheses. What “if” syntax requires is
but you wrote:
see?
Just add another parentheses pair: