First a couple of points on syntax:
a) You are missing a closing } . You open one on line 2 and one on line 7, but only close one on line 11.
b) You need quotation marks around the word course in $_GET[course] . You may want to change the whole statement to

Now, can you explain your problem in a little more detail? I'm not certain I understand. When does abc() get called? Is it when you click on different <option>s in a <select> element, or is it when a link is clicked? I'm trying to clarify why you need to use JavaScript.

I can't see anything really wrong with the code. You can echo out js from php based on php processing. That's not an issue.

However, using php via js once a page has loaded needs AJAX. You can't get around this.

So if you're running a js function in response to say, a change in a select dropdown - this can be run in JUST js, if all return values are known before hand. Otherwise, if you need server-side intervention, e.g. data from a database, you need to use AJAX.