I want to convert
$json_options = array(
1, // JSON_HEX_TAG
2, // JSON_HEX_AMP
4, // JSON_HEX_APOS
8, // JSON_HEX_QUOT
);
to
1 | 2 | 4 | 8
to be used in
json_encode($data, $json_options);
Of course I don't want to implode them to make an string. How to do that?
json_encodedoesn't accept$json_optionsas string.