EDIT:
So, I have following ajax result:
function(data){
var my_title= data.title; // values: post1,post2,post3
var my_name = data.name; // values: steve,mike,sean
var my_html ='<div class="'+ my_title +'">'+ my_name +'</div>'
jQuery('.my_class').append(my_html);
};
So, I have two variables (my_titles and my_name) each with 3 values (n number values).
Then, I want to use these individual values for my_html variable and append them in the .my_class.
The result will be as follow:
<div class="my_class">
<div class="post1">Steve</div>
<div class="post2">mike</div>
<div class="post3">sean</div>
</div>
Any suggestions to how to achieve this?
Thanks
my_titlevariable (what kind of data structure it is). And, describe what exactly you want to do with those values. "run the html function" is not a complete description of what you're trying to accomplish.my_titlea comma separated string or an array?