Your question is not very clear, but as far as I can see you are asking how to do different things depending on which checkbox is selected, right? I am not sure if you are referring to how to do this in JavaScript or PHP, so I will add both.
In JavaScript
Maybe giving both checkboxes a different id will solve your problem. You can then find out which checkbox is checked by for example using:
getElementById("checkboxId").checked //either true or false
If you only want to know which checkbox was being clicked, you can check it's id:
checkboxObj.id
Where checkObj is the object you pass in the onclick attribute of your checkboxes.
In PHP
In PHP, when a checkbox is checked, it's name-value pair is submitted. If its not checked, it will not appear in the data submitted to the server. By checking if the value for a certain checkbox appears in the data submitted to the server, you can check if it has been checked. In your case, you could check if it's value appears in the 'options' array.
You are, however, using the same value ("y") for both checkboxes, so you cannot see the difference between them. By giving them different values (like "x" and "y"), you will be able to see which checkbox has been checked.
The $_GET array will then look like this when, for example, both checkboxes are checked:
$_GET["option"][0] === "x";
$_GET["option"][1] === "y";
You can also loop over them like you are already doing in your code.
Another way
It is not needed to submit your checkboxes all in one array. You can also choose to use different names for them. In that case, you will be able to find them both by using the corresponding index in the $_GET array.
Suppose that the names for the checkboxes are "check1" and "check2", then you can use the following code to check whether they are checked:
isset($_GET['check1']) //True if "check1" is checked
isset($_GET['check2']) //True if "check2" is checked