code:
<?php
include('conn.php');
$student_id = $_SESSION['student_id'];
$college_name = $_GET['college_name'];
$college_name22 = explode('(', $college_name);
if(preg_match('#\((.*?)\)#', $college_name, $match))
{
$match[1] = lcfirst($match[1]);
}
else
{
$match[1] = 'All';
}
?>
If url having string like
cstest/view.php?college_name=Agra%20Public%20Institute%20of%20Technology%20&%20Computer%20Education,%20Artoni%20(Pharmacy)
and I want to explode the following string i.e.
Agra%20Public%20Institute%20of%20Technology%20&%20Computer%20Education,%20Artoni%20(Pharmacy)
when I echo $college_name it display only (Agra Public Institute of Technology) not full name i.e (Agra Public Institute of Technology & Computer Education, Artoni) and $match[1] contain (pharmacy) which is not showing when I print $match[1] it show 'All'. So, how can I fix this problem ?
Thank You
var_dump($_GET)looks like what? For starters, it's not going to have URL encoded strings in it. And if you're accessing a URL with,and(in it, your browser has problems, they would also be encoded as %2C and %28.