The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Conditionals and in_array...
I have created a table, and in that table I have fields. Some of those fields store multiple values (a group of checkbox values). The selected items are stored in the fields as comma seperated strings (using PHP's implode).
I have created a page, and on that page, I have managed to get it to pull the data from that table. I run the resultset through a foreach loop to do some testing. PHP Code:
HTML Code:
<input type="checkbox" name="bodyart[]" value="Pierced tongue" <if condition="in_array('Pierced tongue', $bodyart)">checked</if> /> When I attempt to save the template in the ACP I get this message: Code:
Warning: in_array(): Wrong datatype for second argument in /includes/adminfunctions_template.php(3537) : eval()'d code on line 364 PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|