how to manage complicated array with javascript -


i have:

return data: array ( 0 => 'test' )array ( 0 => 'test drink', 1 => 'chi' ) 

i want split return data 2 arrays:

  • $arrfood, has 1 element: 'test'
  • $arrdrink, has 2 elements: 'test drink' , 'chi'.

how can done?

i understand want create 2 arrays given return 2 arrays, can this:

function array(arr, arr2){    $arrfood = arr;    $arrdrink = arr2; } 

this link can show little more arrays: https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/array


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -