aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 6d5b72f49..f23458db0 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3028,3 +3028,20 @@ function array2XML($obj, $array)
}
}
}
+
+
+function create_table_from_array($table,$arr) {
+
+ if(! ($arr && $table))
+ return false;
+
+ dbesc_array($arr);
+
+ $r = dbq("INSERT INTO " . TQUOT . $table . TQUOT . " (" . TQUOT
+ . implode(TQUOT . ', ' . TQUOT, array_keys($arr))
+ . TQUOT . ") VALUES ('"
+ . implode("', '", array_values($arr))
+ . "')" );
+ return $r;
+
+} \ No newline at end of file