php - Json decode store in single var -


hie all, have $id="1,2,3,";//like this wanted pass within function like..

<input type="submit"  onclick="<?php echo 'edit($id)';?>"> 

i have $id in json_encoded format. want decode it. , store each in single var.

foreach() { // single var store each decoded .. } 

in file1 save id in hidden field,

<form method="get" action="file2.php">     <input type="hidden" name="ids" value="<?php echo $id;?>">     <input type="submit"> </form> 

in file2 this,

$id = $_get['ids']; $id_arr = explode(',',$id);  // gives array 

Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -