JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add enc_json
authorJason Woofenden <jason@jasonwoof.com>
Mon, 25 Sep 2017 01:02:28 +0000 (21:02 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Mon, 25 Sep 2017 01:02:28 +0000 (21:02 -0400)
encode.php

index 381e681..a395a10 100644 (file)
@@ -32,6 +32,10 @@ function enc_jsdq($str) {
        return $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);
 # encode for putting within double-quotes in SQL
 function enc_sql($str) {
        $str = str_replace("\\", "\\\\", $str);