I have this code, but I'm not sure how to convert it to jquery because of the `check` variable which I am using to see if the stuff inside the `if` statement happened at least once. `gph_img_list` is the name tag for lots of radio buttons.

```
    var check = false;
    for (var i=0; i < gph_img_list.length; i++) { 
        if (gph_img_list[i].value == var_gph_img.innerHTML) { 
            gph_img_list[i].checked = true;
            check = true;               
            break;
        }
    }
    if (!check) {
        var_gph_img.innerHTML = "";
    }

```