Strings in PHP

I’ve been looking into how strings work in PHP. Basically if you use a single quote the string is literal and the only two quotes accepted are \\ for backslash and \’ for single quote.

If you use double quotes on the other hand then backslash is the quote character so you can do things like \n for new line or \t for tab. Also you can use variable names in double quotes strings. I still don’t totally understand things like magic quotes work though.

This entry was posted in Programming by Jay Jay. Bookmark the permalink.

About Jay Jay

Hi there. My name is John Elliot V. My friends call me Jay Jay. I talk about technology on my blog at blog.jj5.net and make videos about electronics on my YouTube channel @InTheLabWithJayJay.

Leave a Reply