To 'interact' between javascript and PHP, you have to either use PHP to create javascript code, or use XMLHTTP requests in javascript to access PHP scripts and then handle the output if neccessary.
You cannot write javscript code that directly invokes PHP code. javscript is processed on a client's computer; PHP is processed at the server as a page is requested. Javscript only ever runs after the PHP processor has done its work (and removed all PHP blocks from its output files)
That doesn't mean that you cant create javascript code based on or affected by a PHP process; it just means that the javascript in a PHP file will do what the PHP code tells it to do.
So, by the time javascript runs; this PHP code:
addBookmark('mysite',<? echo 'http://mysite'; ?>)
will always end up as this javscript code:
addBookmark('mysite',http://mysite);
And that code wont work because of quoting.
But this PHP code:
addBookmark('mysite','<? echo 'http://mysite'; ?>');
Generates this code:
addBookmark('mysite','http://mysite');
Which should work.
Plato forgot the nullahedron..