Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

What Is Escaping In A String ?

escaping string php

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 uniqueideaman

uniqueideaman

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 57 posts

Posted 26 April 2017 - 02:32 PM

Folks,
 
What does it really mean by "escaping" in a string ?
 
Eg.
 
The escape-sequence replacements are −
 
\n is replaced by the newline character
\r is replaced by the carriage-return character
\t is replaced by the tab character
\$ is replaced by the dollar sign itself ($)
\" is replaced by a single double-quote (")
\\ is replaced by a single backslash (\)
 
 
Does it mean "translate"/"convert"/"substitute" or does it mean "ignore this single quote and don't take it as the ending single quote" ? I thought the former but some google result links mention the latter but mostly Googling brings irrelevant results. Brings up links related to mysqli_real_escape_string.