I wanted to know what is the difference between \1 and $1 in regex PHP because in every strings that I checked, they were the same and when I searched about it, there wasn’t any good resources or explanations about this issue.
For example:
preg_replace("/([a-z0-9]+)/","$1",$string)
//returns the same as preg_replace("/([a-z0-9]+)/","\1",$string)
>Solution :
There is no difference, other than preference, according to the PHP documentation.