]>
jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blob - misc/strings.php
3 /** Splits up a string by a space
12 function split($str, $delimiter = " ") : Array
14 return explode($delimiter,$str);
17 function glue($array, $delimiter = " ")
20 foreach($array as $str)
24 $string .= $str.$delimiter;
26 return trim($string,$delimiter);
29 function get_relative_path($filename)
31 $relativepath = split($filename, "/");
32 foreach($relativepath as &$tok)
34 $isFinal = ($tok == "html") ? 1 : 0;
39 $relativepath = glue($relativepath,"/");