JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: display page has edit link at top
[wfpl.git] / misc.php
index 1737a86..b18abd4 100644 (file)
--- a/misc.php
+++ b/misc.php
@@ -67,15 +67,12 @@ function exec_pipe($command, $stdin) {
 }
 
 
-
-
-
-
 function unix_newlines($str) {
        $str = str_replace("\r\n", "\n", $str);
        return str_replace("\r", "\n", $str);
 }
 
+
 # return current year (all 4 digits)
 function this_year() {
        return strftime('%Y');
@@ -129,4 +126,8 @@ function ref(&$foo) {
        return new stupid_reference($foo);
 }
 
+function &last(&$array) {
+       if(count($array)) return $array[count($array) - 1];
+}
+
 ?>