Hi, I try to write the value of a html tag to a php variable. I have this code but it won't work as I thought. Tha value of {tag1} is 25. $x = new stdClass; $x->foo = "{tag1}"; $foo = $x->foo; ob_start(); $v = var_export($foo, true); echo $v; $stdClass = ob_get_contents(); ob_end_clean(); $age = $stdClass; When checking the output, the name and not the value is written. echo $age[0] <------ givs ' and not 2 echo $age[1] <------ givs { and not 5 How can I get the $age to contain the value 25? Thanks
{tag1} is the html hook I use in the template to extract a field from a database so I cannot write anything else than {tag1} I want to use the int/number from database in a calculation and since {tag1} is treated as an object I has to get the value into another variable.