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 = '{';
|
||||
$last = $num - 1;
|
||||
$i = 0;
|
||||
foreach($elements as $key => $value)
|
||||
{
|
||||
$output .= '"'.$key.'":';
|
||||
if (is_array($value)) $output.= json_encode($value);
|
||||
else $output .= _val($value);
|
||||
if ($i !== $last) $output.= ',';
|
||||
++$i;
|
||||
if (is_array($elements) && count($elements)>0) {
|
||||
foreach($elements as $key => $value)
|
||||
{
|
||||
$output .= '"'.$key.'":';
|
||||
if (is_array($value)) $output.= json_encode($value);
|
||||
else $output .= _val($value);
|
||||
if ($i !== $last) $output.= ',';
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
$output.= '}';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user