Hey,
i've got a new problem.
I know how i have to define a static JSON-Array, but now i must make this dynamic so i could add items with a loop.
this is the static version:
$json = array(array('field' => 'name',
'value' => $name),
array('field' => 'nummer',
'value' => $numbers));
echo json_encode($json );
and now i got this, but it doesn't work this way:
$element_array = array($element_array);
array_push($element_array, 'field' => 'name', 'value' => $name);
array_push($element_array, 'field' => 'nummer', 'value' => $numbers);
$json = $element_array;
any idea what's the problem?