Check style
(http://www.dolibarr.fr/forum/3-installation/40712-sauvegarde)
This commit is contained in:
parent
e0baa0fe46
commit
9572eebae0
@ -72,13 +72,15 @@ function dol_json_encode($elements)
|
|||||||
$output = '{';
|
$output = '{';
|
||||||
$last = $num - 1;
|
$last = $num - 1;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($elements as $key => $value)
|
if (is_array($elements) && count($elements)>0) {
|
||||||
{
|
foreach($elements as $key => $value)
|
||||||
$output .= '"'.$key.'":';
|
{
|
||||||
if (is_array($value)) $output.= json_encode($value);
|
$output .= '"'.$key.'":';
|
||||||
else $output .= _val($value);
|
if (is_array($value)) $output.= json_encode($value);
|
||||||
if ($i !== $last) $output.= ',';
|
else $output .= _val($value);
|
||||||
++$i;
|
if ($i !== $last) $output.= ',';
|
||||||
|
++$i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$output.= '}';
|
$output.= '}';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user