Here's the thing. I'm using Dreamweaver CS4 to develop a website. In the past my php files would look like this:
Code:
<?php
echo '<h1>Welcome ' . $name . '</h1>';
?>This caused problems in the design view because all I would see would be the php icon to let me know I have some script in this location and that is it.

Then I started to realize that I should write my code like this:
Code:
<h1>Welcome <?php echo $name; ?></h1>This second way of writing php code is a lot easier to work with in Dreamweaver since in the design view I can see the formatted h1 tag with the word 'Welcome' beside it (followed by the php icon). I can still apply all the standard CSS rules inside Dreamweaver and the design view updates nicely.

So now here is my issue. What is the best way to handle if statements? Say I want to toggle between <h1>Welcome $user</h1> and <h2>Good bye</h2> BUT I would like to still be able to format the CSS and see the results on the screen in design view. Is it possible?

Here's the thing. I'm using Dreamweaver CS4 to develop a website. In the past my php files would look like this:
Code:
<?php
echo '<h1>Welcome ' . $name . '</h1>';
?>This caused problems in the design view because all I would see would be the php icon to let me know I have some script in this location and that is it.

Then I started to realize that I should write my code like this:
Code:
<h1>Welcome <?php echo $name; ?></h1>This second way of writing php code is a lot easier to work with in Dreamweaver since in the design view I can see the formatted h1 tag with the word 'Welcome' beside it (followed by the php icon). I can still apply all the standard CSS rules inside Dreamweaver and the design view updates nicely.

So now here is my issue. What is the best way to handle if statements? Say I want to toggle between <h1>Welcome $user</h1> and <h2>Good bye</h2> BUT I would like to still be able to format the CSS and see the results on the screen in design view. Is it possible?