Selecting all [name=] elements

Selecting all [name=] elements

Dear jQueryHelp members,

I am working with jQuery for a few weeks and it's functions and selectors are really amazing.

But now I have a problem, I have a HTML/PHP page with multiple $("[name=reis_id]") elements (input fields with reis_id as their name).

And I need to select all [name=reis_id] elements and get there their val() / values stored in variabeles.

I now have this,
var test = ($("[name=reis_id]").val());


But this only returns the val() of the first element on my page.
I guess i need to make a loop or something to select them all?

help would be welcome