Reputation: 11
Help I am stuck with the following Problem and i cant figure this out. I am supposed to do the following in PHP:
Set a variable to the following: “<&¢£¥€©>” and output it as shown to the browser window.
Here is my code:
<?php
$str = "<&¢£¥€©>"
echo htmlspecialchars($str);
?>
but i keep getting an error.
Upvotes: 0
Views: 97
Reputation: 11171
Do you mean you want to do something like this?
$str = "<&¢£¥€©>";
echo htmlspecialchars($str);
Upvotes: 1
Reputation: 1579
Missing semicolon
$str = "<&¢£¥€©>"; // <-- missing semicolon
echo htmlspecialchars($str);
Upvotes: 1