0

What is {$variable_name} in PHP 5?

I think that prints value of $error variable with HTML tag in echo statement. Am I right?

$error = 'this is an error.';
...   
<?php
if (isset($error)) {
    echo "<p> {$error} </p>\n";
}
?>

But I don't know the difference between <p> {$error} </p> and <p> $error </p>.

chlusher
  • 1
  • 2

0 Answers0