arunpatal Posted November 28, 2013 Share Posted November 28, 2013 Hi, If i have some code to display then i will do like this. <?php highlight_string('<?php echo"Hello World"; ?>') ?> But what if the code is big and content many ' For example <?php highlight_string('<?php echo'Hello World' "Hello World" 'Hello World' "Hello World"; ?>') ?> Is there a function which can auto add \ front of ' which is in highlight_string??? Link to comment https://forums.phpfreaks.com/topic/284351-highlight_string/ Share on other sites More sharing options...
objnoob Posted November 28, 2013 Share Posted November 28, 2013 nope. source code needs to have proper syntax, otherwise it can not be understood by the system and will generate an error. while you're writing your code you be making sure you escape the necessary characters to maintain valid syntax. you can also do a precision find/replace to help with existing source code. find/replace can end up backfiring on you if you're unfamiliar, so be careful not to mess everything up. Link to comment https://forums.phpfreaks.com/topic/284351-highlight_string/#findComment-1460486 Share on other sites More sharing options...
arunpatal Posted November 28, 2013 Author Share Posted November 28, 2013 thanks Link to comment https://forums.phpfreaks.com/topic/284351-highlight_string/#findComment-1460489 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.