summaryrefslogtreecommitdiffstats
path: root/code/util.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'code/util.inc.php')
-rw-r--r--code/util.inc.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/code/util.inc.php b/code/util.inc.php
new file mode 100644
index 0000000..275d3c7
--- /dev/null
+++ b/code/util.inc.php
@@ -0,0 +1,14 @@
+<?PHP
+ if(!defined('UTIL_INC')) {
+ define('UTIL_INC', 1);
+
+ function Subst($string, $subst = array()) {
+ $tr['$$'] = '$';
+
+ foreach($subst as $key => $value)
+ $tr['$' . $key] = $value;
+
+ return strtr($string, $tr);
+ }
+ }
+?>