From: Jason Woofenden Date: Mon, 25 Sep 2017 01:02:28 +0000 (-0400) Subject: add enc_json X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=commitdiff_plain;h=dfb559a8ce4e04d8e5f27f8587141e97f9af1a59 add enc_json --- diff --git a/encode.php b/encode.php index 381e681..a395a10 100644 --- a/encode.php +++ b/encode.php @@ -32,6 +32,10 @@ function enc_jsdq($str) { return $str; } +function enc_json($str) { + return json_encode($str); +} + # encode for putting within double-quotes in SQL function enc_sql($str) { $str = str_replace("\\", "\\\\", $str);