I'm having a bit of trouble understanding why PHP is not escaping brackets when they are near a variable in double quotes. I would really appreciate it if someone could help me out with this issue.
Here's an example of what I mean:
Let's say I have a variable called $num with a value of 5. If I try to echo something like "The value of $num is ($num)", I expect the output to be "The value of $num is (5)". However, PHP seems to ignore the brackets and outputs "The value of $num is $num".
I've tried using different escape characters, like backslashes before the brackets, but it doesn't seem to make a difference. Is there something I'm missing here? Is there a specific way to escape the brackets in this situation?
Any help or guidance would be greatly appreciated. Thanks in advance!