Reputation: 2489
i use an if function to display copy but this copy has to be wrapped in double quotes, and i cant get it working. any help please.
Code
$currentpage = $_SERVER['REQUEST_URI'];
if ($currentpage == "/room/penthouse-suite/"){
echo "<div class='text-center text-emphasis text-lg'>"test penthouse"</div>";
}
so on my page it should display ---> "test penthouse"
Upvotes: 0
Views: 2953
Reputation: 3676
You can simply escape the characters by using a backslash.
$currentpage = $_SERVER['REQUEST_URI'];
if ($currentpage == "/room/penthouse-suite/"){
echo "<div class='text-center text-emphasis text-lg'>\"test penthouse\"</div>";
}
Upvotes: 5