PDA

View Full Version : dont evaluate variable, just print it ?


8utt
04-03-2007, 07:00 AM
I have a template which has some variables and some non variables but both use the same structure as php


$varaible_a
$variable_b

what I want to do is the template to print the variable value for variable_a but just print $variable_b. Example, is variable_a = 10 my output would be



10
$variable_b

is there an easy way to do this ?

sussed it

$variable_a
\$variable_b

cashpath
04-03-2007, 03:22 PM
For

10
$variable_b

use echo $variable_a . '<br />$variable_b';

For

$variable_a
$variable_b

use echo '$variable_a <br /> $variable_b';



Note the single quotes. Single quotes do no parse variables, and are faster than double quotes. Only use double quotes when needed.