How do I use multiple flags for the php json_encode()-function?
json_encode($array, JSON_PRETTY_PRINT, JSON_UNESCAPED_UNICODE);
This doesn\
Those flags are bitmasks. I wrote about it once a long time ago here on SO.
So, basically, to use more than one option, you need to or them together
json_encode($array, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
You use a bitmask, as specified in http://php.net/manual/en/function.json-encode.php:
json_encode($array, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
This will add the binary values of JSON_PRETTY_PRINT
and JSON_UNESCAPED_UNICODE
with the binary OR operator.