0

I'm new with programmation JQuery, Json into PHP.
my doubt is this:

I have a chain Json as the following example

[
 {"idwork":"1","status":"to_do"},
 {"idwork":"2","status":"in_process"},
 {"idwork":"3","status":"testing"}
]

and this chain is lodged in a variable called "data". I want post this to a class, named operation where it receive this values idwork and status, to do a consultation into SQL.

Class operation

<?php
require_once('../../clases/tarea.php');
$operacion=$_REQUEST['operaciones'];
$tarea_temporal=new tarea($_REQUEST['idtarea'],'','',0,0,0,0,0,$_REQUEST['status']);

switch($operacion)
{
case 'Modificar':
$tarea_temporal->update_status();
break;
}

header('Location:../baraja/task.php.php');
?>

I want to know how to send this variable in a form

4

1 回答 1

0

您可以使用 json_decode,然后您可以访问对象或数组之类的数据...在文档中,您有一个示例:

http://es1.php.net/json_decode

于 2013-07-04T14:35:12.577 回答