Can someone help me with smarty syntax for “in_array”?
I want to check if 2 variables in array:
{if in_array(($x,$y), $array)}var x and var y are in this array{/if}
is this syntax and or semantic right?
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.
This is not an issue of “smarty syntax”, but rather an issue of using the PHP function
in_arraycorrectly. Check out the documentation: http://php.net/manual/en/function.in-array.php