<?php
$products = array('horloges', 'media', 'gereedschap');
echo'<pre>';print_r($products);
// convert to a string
$string = json_encode($products);
echo $string; // ["horloges","media","gereedschap"]
// you can reproduce the original variable
$products = json_decode($string);
echo'<pre>';print_r($products);
<pre>Array
(
[0] => horloges
[1] => media
[2] => gereedschap
)
Fatal error: Call to undefined function json_encode() in /in/tCt3D on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<pre>Array
(
[0] => horloges
[1] => media
[2] => gereedschap
)
Fatal error: Call to undefined function: json_encode() in /in/tCt3D on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
<pre>Array
(
[0] => horloges
[1] => media
[2] => gereedschap
)
Fatal error: Call to undefined function: json_encode() in /in/tCt3D on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<pre>Array
(
[0] => horloges
[1] => media
[2] => gereedschap
)
Fatal error: Call to undefined function: json_encode() in /in/tCt3D on line 6