php - passing array to a jquery function -


i want pass array parameter of jquery function. when alert array function array() { [native code] }

this error tried in php. here sql functions self written. sure. , throughout loop printing data data table. works. want show other thing when button clicked.

$i=0; for(;$i<sql_num_rows($result);$i++) { $row=  sql_fetch_array($result); $j = 0; $data[$i][$j++] = $row['user_id']; $data[$i][$j++] = $row['first_name']; $data[$i][$j++] = $row['last_name']; $data[$i][$j++] = $row['user_address']; $data[$i][$j++] = $row['user_phone'];; $data[$i][$j++] = "<button onclick='update_user_info($row)'>detail</button>"; } 

and in javascript

function update_user_info(user_info) {   alert(user_info) } 

can me how can array value. array has value $row['name'],$row['email']..... need these values. please help


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -