i want to acheive this :
for (i = <?php echo $current_i ?> /*then I get augmented in javascript */;i<max;i++){
$('#anyid****')./* my actions goes here */
}
here i want to put the counter I of the javascript in the selector
how could i do that ???
Sorry i don’t know PHP but i hope you wanted to do something like below
the + is for concatenation, i hope it is same in PHP. Also you could cast i to string.
Just for OP’s understanding
in line 2
$('#div'+i)iis a integer type and others$(#div)are of type string. For jquery needs a string selector to retrieve a matching dom node and for thatineeds to also be casted/converted to a string variable so that it could concatenate/add/attach with the prefix string which is in this example#div. in c# you add 2 strings like thisvar result = "#div" + i.ToString();and i did not know PHP equivalent for+in c#,hence a sorry at the start of post. Now do you understand?