Hi I have some advertising js code that I want to put into a php variable for inclusion in my site. The code goes something like this: $_ad_Code=<<<ADC blahdibhal dljfdlkf$jump dkhfdkd ADC; Code (php): The $jump in the heredoc above is not related to php but a part of the js ad code. Now the problem I am faced is that php is trying to expand $jump and generating error messages as a result. I don't want it to expand $jump but just display it literally (leave it to the client's browser to interpret). How do I prevent php from expanding $jump? I tried escaping it with a \ just before $jump but it does not work. Thanks Abdussamad
Put it in single-quotes. The variables will not be expanded. Like this: $ad_code = ' some text here $i_will_not_be_expanded';
You will need to escape the dollar sign. $_ad_Code=<<<ADC blahdibhal dljfdlkf\$jump dkhfdkd ADC; PHP: