Jump to content

A simple php echo question


egorig

Recommended Posts

honestly... its really down to personal preference...

personally... i template everything... so all my stuff is stored in strings, untill it hits the template.php in which is 99% html code... where i <?=$var?>

 

What does it do?

<?php
<?=$var?>
?>

 

Nothing anymore it has been depreciated. Best practice is to use this:

 

<html>
<title><?php print $var; ?></title>

 

Essentially what it used to do was just print a variable to the string, but some issues arose with that so they made that functionality depreciated as of 4.4 I believe not sure.

 

Anyhow if you plan on upgrading php anytime soon that will break anyscripts that use that methodology.

honestly... its really down to personal preference...

personally... i template everything... so all my stuff is stored in strings, untill it hits the template.php in which is 99% html code... where i <?=$var?>

 

What does it do?

<?php
<?=$var?>
?>

 

Nothing anymore it has been depreciated. Best practice is to use this:

 

<html>
<title><?php print $var; ?></title>

 

Essentially what it used to do was just print a variable to the string, but some issues arose with that so they made that functionality depreciated as of 4.4 I believe not sure.

 

Anyhow if you plan on upgrading php anytime soon that will break anyscripts that use that methodology.

 

What type of issues arosed?

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.