Page 1 of 1

php code inside $outpu = ""

Posted: Sat Jun 05, 2004 5:38 pm
by pinehead18
Currently my template system has a header which echo's $output in the area which i want it to display. So on my individual pages i have $output = "content";

However i need to put some if statements inside of $output = " ";

How do i put in the if statements $output = " if ($hi == 0) { hello } ?";

I woulnd't think that that script would work, or would it?

Thank you
Anthony

Posted: Sat Jun 05, 2004 5:47 pm
by John Cartwright
why don't you just do this

Code: Select all

<?php

if ($foo=="bar"){
         $content = "foo";
}else{
         $content = "bar";
}

?>