All Questions
2 questions
0
votes
5
answers
6k
views
Why $_SERVER['REQUEST_URI' NOT working with IF condition
My webpage url is http://example.com/blog/
When I echo it is showing the correct result as blog.
echo $_SERVER['REQUEST_URI']
>>blog
But, when I use in if condition
<?php if($_SERVER['...
1
vote
2
answers
224
views
class within an div using php echo
Just basically want to know if its possible adding an class to my div which i echo using an if statement.
My code:
$currentpage = $_SERVER['REQUEST_URI'];
if ($currentpage == "/room/penthouse-suite/...