original_string: protected function arrayToHtml($content, $html = '')
      {
          // scalar types can be return directly
          if (is_scalar($content)) {
              return $content;
          }
  
          $html = "<ul>\n";
  
          // field name
          foreach ($content as $field => $value) {
              $html .= "<li><strong>" . $field . ":</strong> ";
              if (is_array($value)) {
                  // recurse
                  $html .= $this->arrayToHtml($value);
              } else {
                  // value, with hyperlinked hyperlinks
                  if (is_bool($value)) {
                      $value = $value ? 'true' : 'false';
                  }
                  $value = htmlentities($value, ENT_COMPAT, 'UTF-8');
                  if ((strpos($value, 'http://') === 0) || (strpos($value, 'https://') === 0)) {
                      $html .= "<a href=\"" . $value . "\">" . $value . "</a>";
                  } else {
                      $html .= $value;
                  }
              }
              $html .= "</li>\n";
          }
          $html .= "</ul>\n";
  
          return $html;
      }
code: protected function arrayToHtml($content, $html = '')
      {
          // scalar types can be return directly
          if (is_scalar($content)) {
              return $content;
          }
  
          $html = "<ul>\n";
  
          // field name
          foreach ($content as $field => $value) {
              $html .= "<li><strong>" . $field . ":</strong> ";
              if (is_array($value)) {
                  // recurse
                  $html .= $this->arrayToHtml($value);
              } else {
                  // value, with hyperlinked hyperlinks
                  if (is_bool($value)) {
                      $value = $value ? 'true' : 'false';
                  }
                  $value = htmlentities($value, ENT_COMPAT, 'UTF-8');
                  if ((strpos($value, 'http://') === 0) || (strpos($value, 'https://') === 0)) {
                      $html .= "<a href=\"" . $value . "\">" . $value . "</a>";
                  } else {
                      $html .= $value;
                  }
              }
              $html .= "</li>\n";
          }
          $html .= "</ul>\n";
  
          return $html;
      }
code_tokens: protected function arrayToHtml ( $ content , $ html = '' ) { // scalar types can be return directly if ( is_scalar ( $ content ) ) { return $ content ; } $ html = "<ul>\n" ; // field name foreach ( $ content as $ field => $ value ) { $ html .= "<li><strong>" . $ field . ":</strong> " ; if ( is_array ( $ value ) ) { // recurse $ html .= $ this -> arrayToHtml ( $ value ) ; } else { // value, with hyperlinked hyperlinks if ( is_bool ( $ value ) ) { $ value = $ value ? 'true' : 'false' ; } $ value = htmlentities ( $ value , ENT_COMPAT , 'UTF-8' ) ; if ( ( strpos ( $ value , 'http://' ) === 0 ) || ( strpos ( $ value , 'https://' ) === 0 ) ) { $ html .= "<a href=\"" . $ value . "\">" . $ value . "</a>" ; } else { $ html .= $ value ; } } $ html .= "</li>\n" ; } $ html .= "</ul>\n" ; return $ html ; }
docstring: Recursively render an array to an HTML list
  
  @param mixed $content data to be rendered
  
  @return null
docstring_tokens: Recursively render an array to an HTML list