php - JSON_PRETTY_PRINT and JSON_UNESCAPED_SLASHES in same argument -


i trying pretty print json array, , un-escape slashes @ same time, don't know how...

i've got:

<pre><?php echo json_encode($data, json_pretty_print); ?></pre> 

or

<pre><?php echo json_encode($data, json_unescaped_slashes); ?></pre> 

working fine on own, can't seem combine them.

found out how:

<pre><?php echo json_encode($data, json_unescaped_slashes | json_pretty_print); ?></pre> 

read php bitwise operators.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -