Since on PHP the function ereg is deprecated we should use:
preg_match()
But here is a catch!!!! since the POSIX regular expressions are different from the PCRE used in preg_match(), you need to replace:
ereg(‘^([^=]*)=[“\’]?([^”\’]*)[“\’]?$’,$v,$a3)
with:
preg_match(‘/^([^=]*)=[“\’]?([^”\’]*)[“\’]?$/’, $v, $a3)
Note that the / works as delimiter.
That’s all