Simple hide&show - dynamic input fields.

Simple hide&show - dynamic input fields.

Hello!

For example i have this sort code:

for ($i=0;$i<$db;$i++) {
$t1="toggleh$i";
echo "<div class='c'>Test<input name='$t1' type='image' id='$t1' src='test.png'/></div> <br>";
}


Its ok... i try to make clear the screen for users, so i use hide & show to hide some row on screen what users actually dont need...

The JS part of code is something like this:

$('#toggleh0').click( function() {
    $('div.showhide').toggle(400);
   });
    $('#toggleh1').click( function() {
    $('div.showhide').toggle(400);
   });
$('#toggleh3').click( function() {
    $('div.showhide').toggle(400);
   });
.
.
.

I know this is not a good solution. But i dont know how can do this dynimc. So if "$i=6;" then i need toggle0-6 function...

Could you help someone?

Sorry for my poor english, i lame question...

Tnx