Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Function Reference

ent ( s , replace_spaces [false] , replace_quotes [3] , replace_newlines [true] )

Description
No description.
 
Parameters
requireds
optionalreplace_spaces [false]
optionalreplace_quotes [3]
optionalreplace_newlines [true]
 
Code
433  function ent($s,$replace_spaces=false,$replace_quotes=ENT_QUOTES,$replace_newlines=true)
434  {
435      if (is_array($s))
436      {
437          $sv = array();
438          foreach ($s as $k=>$v)
439          {
440              $sv[$k] = ent($v);
441          }
442          return $sv;
443      }
444      else
445      {
446          $r = htmlentities($s,$replace_quotes);
447          $r = $replace_newlines ? preg_replace("/[\x09\x0A\x0D]/e",'"&#" . ord("$0") . ";";',$r) : $r;
448          return $replace_spaces ? preg_replace("/\x20/e",'"&#" . ord("$0") . ";";',$r) : $r;
449      }
450  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads