I'm rewriting my template engine to deal with multiple parts of an if statement, eg:
Code: Select all
{if $login_disabled&&$login_disabled}Code: Select all
$login_disabled&&$login_disabledOnly problem now is that whenever I do a regex statement, match or replace, it only captures the first letter after the dollar sign:
Code: Select all
preg_match('/\\$([a-z0-9]+?)/is', $matches[1], $match);
Code: Select all
Array
(
[0] => $l
[1] => l
)
Code: Select all
<?php if($this->PV_vars['login_disabled']): ?>
Code: Select all
preg_replace('/\\$([a-z0-9]+?)/is', '\$this->PV_vars(\'$1\')', $matches[1]);
Code: Select all
<?php if(!$this->PV_vars('l')ogin_disabled): ?>
Cheers,
Darkzaelus