- strpos: documentation ( source)
<?php
$_SERVER['REQUEST_URI'] = 'my-account/orders';
if (strpos($_SERVER['REQUEST_URI'], "online") >= 0) {
$left_col_class = "gkPageContent";
}
elseif(strpos($_SERVER['REQUEST_URI'], "student-login") >= 0) {
$left_col_class = "showme";
echo "this is not sanjay";
}
elseif(strpos($_SERVER['REQUEST_URI'], "my-account/orders") >= 0) {
$left_col_class = "showme";
}
elseif(strpos($_SERVER['REQUEST_URI'], "my-account/my-courses") >= 0) {
$left_col_class = "showme";
}
elseif(strpos($_SERVER['REQUEST_URI'], "my-account/fourm") >= 0) {
$left_col_class = "showme";
}
elseif(strpos($_SERVER['REQUEST_URI'], "student-login") >= 0) {
$left_col_class = "showme";
}
elseif (strpos($_SERVER['REQUEST_URI'], "student-login") >= 0) {
$left_col_class = "showme";
}
else{
echo "dam thing";
}
echo $left_col_class;