Send php variable to javascript file not working!

I am trying to pass a php variable to a javascript file via a link.
The link is set up as follows:
<a href=“video-details.php?src=<?php echo $row_videos[‘YouTube_Ref’];?>”>

The javascript variable is a s follows:

var id = 'flash';
	var src = "<?= $src ?>";
	var params = {allowScriptAccess:"always"};
	var atts = {id:"my-player"};
	
	swfobject.embedSWF("http://www.youtube.com/apiplayer?video_id="+ src +"&amp;version=3&amp;enablejsapi=1", id, "100%", "100%", "9.0.0", "data/flash/expressInstall.swf", null, params, atts);

I can’t get this to work for some reason can anyone tell me what I’m doing wrong here please?

Thanks for any help in advance.

I’ve managed to get this working, not as cleanly as I’d wanted but it works for now until I figure out a better way.