PDA

View Full Version : Using phpinclude_start


paulyy
04-07-2005, 11:32 PM
It doesn't seem to want to accept to following code;

if (THIS_SCRIPT == 'index') {
$page_menu = '<if condition="$bbuserinfo['userid']">it works<else />login</if>'; }

But if I just use;

if (THIS_SCRIPT == 'index') {
$page_menu = 'it works'; }

It will. So I assume it's the fact I'm trying to use an if condition in the wrong place. So, what would I need to do to get the top piece of code to work effectively?

Adrian Schneider
04-08-2005, 01:22 AM
I'm pretty sure you need to escape some of the symbols, I could be wrong though.

Try eval('$variable= "' . fetch_template('template_name') . '";');
inplace of the second line. And stick the <if> ...</if>inside a template (template_name). This would just check if my theory is correct, but of course you could use this too.

You could also (which would make more sense to me) have all of it inside the template you are using (not php one) as nested <if>s instead of using the php one, or do the opposite: all in php.

IMO anyway.