Page 1 of 1

Question on HTML inside PHP

Posted: Wed Nov 29, 2006 10:35 pm
by admaster
I have this code:

Code: Select all

<? 
if($logged_in){
//stuff goes here
}
?>
where I have marked:

//stuff goes here

I want html tags.
How do I do that?

It creates errors when I do that...

Posted: Wed Nov 29, 2006 10:40 pm
by Zoxive

Code: Select all

<?php
if($logged_in){
print '<strong>Bold Text</strong>';
}
?>
or

Code: Select all

<?php
if($logged_in){
?>
<strong>Bold Text</strong>
<?php
}
?>
I Prefer the first one.