I have a code which is in PHP Loop.
<?php for($i = 1; $i++; $i < 10) { ?>
<div class="test">
<textarea name="test-textarea" for="<?php echo $i ?>"></textarea>
<button value="<?php echo $i ?>">Save</button>
</div>
<?php } ?>
Now I want to alert data in JQuery. When I click button which value is 7 then it will alert data of textarea which is for value is 7.
Any Help will be Appreciated.
Thanks.