How to change inputs name with each. and attr. functions?

How to change inputs name with each. and attr. functions?

Hi everybody, i've got form:

<form action="<?php echo $url;?>" method="post">
<div class="input_fields_wrap">
<?php
if ($options) {
$cssPrefix = 'festi-link-builder-';
$hideRemoveButton = (count($options['linkbuilder']) <= 1) ? $cssPrefix.'hide' : '';
foreach ($options['linkbuilder'] as $key => $item) {
?>
<div class="container">
<input class="LinkbuilderForWords" type="text" name="linkbuilder[<?php echo $key; ?>][word]" value="<?php echo $item['word']?>" placeholder="enter keyword" /></br>
<input class="LinkbuilderForLinks" type="text" name="linkbuilder[<?php echo $key; ?>][link]" value="<?php echo $item['link'];?>" placeholder="enter keyword" /></br>
<a class="delete_div_button <?php $hideRemoveButton; ?>"   name="<?php echo $key;?>" href="#">delete</a>
</div>
<?php
}
}
?>
</div>
<input type="submit" value="save"></br>
<a class="add_field_button" href="#">Add More Fields</a></br>
</form>
everytime when i am creating a new fields, name of this inputs is Linkbuilder[0] i need to change all new inputs like this:
<input name="Linkbuilder[1]">
<input name="Linkbuilder[2]">
<input name="Linkbuilder[3]">

i am new in jQuery, and can't understand how to do this...
All what i've done in jQuery code is:

jQuery().each(".LinkbuilderForWords input", function() {
 jQuery().attr('name', 'linkbuilder[0]');
});
Excuse me if my explanations are not clear(