i tried many options, but still can't find a elegant solution to this problem:
pls help me or give hints if possible, thanx in advance.
problem: switching html parts on and of depending on a (single)variable
fact: html belongs on the html side :-) php in the php file.
example of last solution::
php code=
if($somthingok){
$snipbuttonon=' ';
$snipbuttonoff='';
}else{
$snipbuttonon='';
$snipbuttonoff=' ';
}
|
html side=
<a href="go.php" class="button">[var.snipbuttonon;magnet=a]GO</a>
<font class="button">[var.snipbuttonoff;magnet=font]GO</font>
|
as you can see, depending on my var $somthingok, html will be switched on or off resulting in a link that becomes (de)activated.
I give this as an example, so pls dont tell me about the html code.
the idea behind the construction is more my problem.
Now i need 2 vars for 1 problem, and a strange inelegant construct.
can this be solved in an other way pls?
(i dont wanne put html on the php side btw)