Page 1 of 1

Output variable with HTML formatting intact...

Posted: Fri Apr 04, 2008 9:51 am
by HaddyConsulting
How do I output a variable value with HTML formatting intact? I have tried the following without success:

Code: Select all

print "$myvariable";

Code: Select all

printf($myvariable);

Re: Output variable with HTML formatting intact...

Posted: Fri Apr 04, 2008 11:01 am
by mchaggis
Both print statements will print the contents of the variable as is, so if it contains html it will be outputted as HTML.

If it is not printing the contents correctly, the the contents is mucked up. Can you post some example outputs as well as your code.