A
Anonymous
Guest
its been a while since i used php so this is probably very obvious. i'm trying to use php to check the value of a function result and then output html accordingly. here's the code:
i get a parse error for the first line which sets the $layout variable. can anyone tell me what is causing this?
many thanks,
lukemack.
Code:
<?php if (mosCountModules('frontimage') > 0) {
$layout ='<div id="frontimage"><?php mosLoadModules('frontimage', -1 );?></div><div id="lead_back"><img src="/templates/PCGMambo/images/mouse.png" /></div><div id="lead_story"><?php mosLoadModules ( 'right',-1 ); ?></div>';
}
elseif (mosCountModules('frontimage') == 0){
$layout = '<div id="mainbody"><?php mosMainBody(); ?></div>';
}
?>
<div id="lead_back"><img src="/templates/PCGMambo/images/mouse.png" /></div>
<?php echo $layout ?>
i get a parse error for the first line which sets the $layout variable. can anyone tell me what is causing this?
many thanks,
lukemack.