I'm now thinking to put some ad in my website. Above all Adsterra seems nice for me. I registered there and get some code to display their ad on my site.
The code looks like this:
<script type="text/javascript">
atOptions = {
'key' : '0000',
'format' : 'iframe',
'height' : 250,
'width' : 300,
'params' : {}
};
document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://www.example.com/invoke.js"></scr' + 'ipt>');
I placed in on my WordPress blog and its fine, but when in my other php made part, this made my those sections blank or gave an error.
I checked the error Log file and it was:
PHP Parse error: syntax error, unexpected 'key' (T_STRING), expecting ',' or ';' in /home/fajlamic/public_html/links/inc/head.php on line 60
I added my whole head.php
file in a pan >> http://codepen.io/anon/pen/mepqEq
I've done some Google searching and also in StackOverflow but nothing seemed to work for me. Can anyone tell me how I can revise what I have so it works properly?
echo '...'
with a string that also contains single quotes ({ 'key' : ...}
).