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? Link to comment https://forums.phpfreaks.com/topic/47596-solved-how-do-you-do-this/ Share on other sites More sharing options...
Maverickb7 Posted April 18, 2007 Share Posted April 18, 2007 use addslashes() Link to comment https://forums.phpfreaks.com/topic/47596-solved-how-do-you-do-this/#findComment-232360 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. Link to comment https://forums.phpfreaks.com/topic/47596-solved-how-do-you-do-this/#findComment-232362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.