Jump to content
Killersites Community
Sign in to follow this  
Audrey87

curly brackets! in CRUD..

Recommended Posts

i pretty much understand the use of brackets i'm stuck on why a single bracket would be used inside <?php } ?>.

code from crud video lesson :

 

<?php if ($id != '') { ?>
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<p>ID: <?php echo $id; ?></p>
<?php } ?>

Share this post


Link to post
Share on other sites

Hi,

Your code doesn't look right.   PHP code-blocks always start and end like so:

<?php echo '<p>Hello World</p>'; ?> 

So this is incorrect:

1 hour ago, Audrey87 said:

<?php } ?>

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×