Ashley Bye
Ashley Bye

Reputation: 1750

How to escape hash symbol in a string in php

How do you escape the hash symbol in PHP?

I want to do "DELETE FROM [#8:1]" but to make it work I have to do "DELETE FROM [".'#'."8:1]". Whilst it works, it looks a little bit clumsy, is there a better way to do this?

Upvotes: 4

Views: 6522

Answers (1)

Arialdo Martini
Arialdo Martini

Reputation: 4567

Use single quotes

'DELETE FROM [#8:1]'

Upvotes: 3

Related Questions