i am using this code and its getting No ending delimiter ‘/’ found
if (preg_match("/", $desp))
{
$dp = explode("/",$desp);
$dp1 = $dp[0];
$dp2 = $dp[1];
}
in $desp i have value like abc/xyz then it should be like
$dp1 = abc
$dp2 = xyz
so what is the right code thnx.
You should use strpos instead. Anyway, the reason you’re getting that error is because the pattern doesn’t have delimiters.
An example of the pattern with delimeters:
What you should do, however: