PDA

View Full Version : <if> condition from PHP to vbulletin template


Raw Sugar
06-07-2013, 08:08 PM
I know that within templates, the <if> codes look more like HTML than anything.

I need help translating a PHP code to that format. It's not working and I keep getting an error of: "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/theafter/public_html/member.php(515) : eval()'d code on line 142" when I try this.


<?php
if( empty($userinfo['field66']) && empty($userinfo['field11']) && empty($userinfo['field44']) && empty($userinfo['field27']) && empty($userinfo['field82']) ) {
echo "this happens";
}
?>


I appreciate any help in advance!!

Lynne
06-07-2013, 09:01 PM
<if condition="(empty($userinfo['field66']) && empty($userinfo['field11']) && empty($userinfo['field44']) && empty($userinfo['field27']) && empty($userinfo['field82']) )">
stuff here
</if>

Raw Sugar
06-08-2013, 02:51 PM
Perfect, thank you! :)