Okay, so I have a php variable which stores:
http://gdata.youtube.com/feeds/api/videos/gzDS-Kfd5XQ?v=2&alt=json-in-script&callback=youtubeFeedCallback
This is working fine and i want to do the following:
<script type="text/javascript" src="<?php echo $string; ?>"></script>
But it doesn’t seem to be working
Thanks for any help
EDIT:
Here is my code, tried all 3 answers below but didn’t work:
http://pastebin.com/xYKW8TTd
This seems to work as expected:
with the output of:
Edit: in your source code on pastebin, you seem to have:
which contains
&in the place of&which would stop the link working. Was this somethign that pastebin did or was it in your original code?You can’t send HTML codes to the URL window and expect it to work the same way as if it was in a HTML body.
The following code (just edited
$idas I am not putting anything in GET and modified&symbols gave:Had the output of: