Extreme23 Posted November 29, 2010 Share Posted November 29, 2010 Hey Guys, I'm looking to echo a large amount of complicated text that includes a lot of symbols, such as this: V\"`'8\"`%n\"`)*$6A`!K!`2D\"`-t\"`!8\"`,?$`!1#D`\"i!`&2%` 9!`$S\"`#C)`# \"`\">\"7`)Q$`+Y\"C`!B!`%2\"`(e\"`($-`&M(`&C#F`$Q$`-P(`$P\"`#Q-`\"A\"`$CA`1e1` 5(`2GC0%2`&x!`'\"#`,i$`%D\"77`\"W!`%K!`$A.`/q+`(V\"`!J\"`,/\"`//%6E`$:#`.%)`\"u!`.d&`,K$`&F#`#V%`!z%`#2\"` &\"`&0!`3.&`2V%`)#+`\"t\"`.,\"` E!`(m&`3P(7`%l*`#q\"`-Q!`(#\"``1)\"` kC`#P+`$I2`-#\"`3<66`0H!`,|&6`#d#`$}. Can anyone shed some light as to how I would be able to echo the above without having to backlash all the clashing symbols and preferably without having to include an external file? All your help is greatly appreciated. Extreme. Quote Link to comment https://forums.phpfreaks.com/topic/220124-echoing-large-amount-of-symbols/ Share on other sites More sharing options...
trq Posted November 29, 2010 Share Posted November 29, 2010 Put the data in single quotes, I don't see any in there. Quote Link to comment https://forums.phpfreaks.com/topic/220124-echoing-large-amount-of-symbols/#findComment-1140863 Share on other sites More sharing options...
Extreme23 Posted November 29, 2010 Author Share Posted November 29, 2010 Put the data in single quotes, I don't see any in there. Thank you for the reply, it's appreciated! But, in the original text I need to echo I found there's over 200 single quotes and over 500 double quotes! Quote Link to comment https://forums.phpfreaks.com/topic/220124-echoing-large-amount-of-symbols/#findComment-1140870 Share on other sites More sharing options...
Extreme23 Posted November 29, 2010 Author Share Posted November 29, 2010 I did a mass find and replace, so I replaced \ with \\ and then replaced " with \" ... but I'm still getting the error. Should I be replacing ' with \' then? Quote Link to comment https://forums.phpfreaks.com/topic/220124-echoing-large-amount-of-symbols/#findComment-1140874 Share on other sites More sharing options...
trq Posted November 29, 2010 Share Posted November 29, 2010 Single quotes are fine within a double quoted string. I would be inclined to use a single quoted string though, just because there are other special chars in there that might break within double quotes. Not much you can do though, your going to need to escape the data properly. What the hell is it if you don't mind me asking? Quote Link to comment https://forums.phpfreaks.com/topic/220124-echoing-large-amount-of-symbols/#findComment-1140876 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.