]> andersk Git - sql-web.git/blobdiff - lib/display.lib.php
git-svn-id: svn://presbrey.mit.edu/sql/web@112 a142d4bd-2cfb-0310-9673-cb33a7e74f58
[sql-web.git] / lib / display.lib.php
index 4dfb81c00b8a19a0868a265738e043d323f24500..e33721d1339935312ae802351ee0fb086a865b0c 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+/*
+       (c) 2005 Joe Presbrey
+*/
 
 ## FORMATTING FUNCTIONS
 
@@ -60,4 +63,14 @@ function printBar($percent, $txt1 = '', $txt2 = '') {
                                </table>';
 }
 
+function chars_encode($string) {
+   $chars = array();
+   $ent = null;
+   $chars = preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY);
+   for ($i = 0; $i < count($chars); $i++)
+               $ent[$i] = '&#' . ord($chars[$i]) . ';';
+   if (sizeof($ent) < 1) return '';
+   return implode('',$ent);
+}
+
 ?>
This page took 0.025024 seconds and 4 git commands to generate.