Jump to content

Simple Question


jamesjmann

Recommended Posts

For a visual reference...

 

<?php
if($variable == "xxxx")
    {
    ?>
           <!-- DO SOME HTML JS OR OTHER CODE HERE -->
    <?php
    }
    ?>

 

so you can't write the html or javascript within the bracket like this?

<?php
if($variable == "xxxx")
    {
<!-- DO SOME HTML JS OR OTHER CODE HERE -->
    }
    ?>

Or can you do it both ways?

Link to comment
https://forums.phpfreaks.com/topic/228007-simple-question/#findComment-1175802
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.