ballhogjoni Posted April 18, 2007 Share Posted April 18, 2007 How do you place a "\" in a string. example: $123="this is a backslash: \"; How do you get this to work? Quote Link to comment Share on other sites More sharing options...
Maverickb7 Posted April 18, 2007 Share Posted April 18, 2007 use addslashes() Quote Link to comment Share on other sites More sharing options...
per1os Posted April 18, 2007 Share Posted April 18, 2007 First of all, $123 is not a valid variable name =) <?php $one23 = " This is a backslash \\"; ?> You have to escape the escaping character. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.