tags:

views:

38

answers:

3

i want make function like that

function(data){

}

i want this data as this url,email,comments

function($data){
foreach(explode(",",data) as $value)
var value = $("#value").val();
}

this code is like php iam sure its not work but i want make this by jquery i made it by php please help me

+1  A: 

You can use

jQuery.each

to iterate through the object

rahul
+1  A: 

jQuery is a Javascript library, not a PHP library.

Oded
+1  A: 
function(data) {
    var i, values = data.split(",");
    for (i = 0; i < values.length; i++) {
        var value = $("#" + values[i]).val();
    }
}
MBO