$tag = FALSE; // Odd/even counter (tag or no tag) $casing = NULL; // Case
conversion function $output = ''; $indent = array(); // All current indentation
string chunks $lists = array(); // Array of counters for opened lists foreach
($split as $value) { $chunk = NULL; // Holds a string ready to be formatted and
output.
// Process HTML tags (but don't output any literally). if ($tag) {
list($tagname) = explode(' ', strtolower($value), 2); switch ($tagname) { //
List counters case 'ul': array_unshift($lists, '*'); break; case 'ol':
array_unshift($lists, 1); break; case '/ul': case '/ol': array_shift($lists);
$chunk = ''; // Ensure
Partager