JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform's html type supports image uploads by default
[wfpl.git] / misc.php
index bbe7013..830796a 100644 (file)
--- a/misc.php
+++ b/misc.php
@@ -94,6 +94,20 @@ function today_ymd() {
        return strftime('%Y-%m-%d');
 }
 
+
+function get_text_between($text, $start_text, $end_text) {
+       $start = strpos($text, $start_text);
+       if($start === false) {
+               return false;
+       }
+       $text = substr($text, $start + strlen($start_text));
+       $end = strpos($text, $end_text);
+       if($end === false) {
+               return false;
+       }
+       return substr($text, 0, $end);
+}
+
 # php4 is broken, in that you cannot set a default value for a parameter that
 # is passed by reference. So, this is set up to use the following screwy
 # syntax: