name).'(\([^\)]*\))([^\n]*\n)?(.*)$#is', $row->description, $matches); if($isFunc) { //var_dump($matches); $declaration = $matches[2]; $declaration = str_replace("'", "''", $declaration); $description = $matches[4]; $description = preg_replace('#\bURL\:\s+\S+#s', ' ', $description); $description = str_replace("'", "''", $description ); //$description = preg_replace('#(\s+)#', ' ', $description); //$description = wordwrap($description,72, " '".$nl." +'"); $description = trim($description); $description = preg_split('#\r?\n#', $description); $description = implode("'+sLineBreak\r\n +'", $description); $fstruc[$row->name] = sprintf(" (".$nl ." Name: '%s';".$nl ." Declaration: '%s';".$nl ." Category: '%s';".$nl ." Version: %s;".$nl ." Description: '%s'".$nl ." ),".$nl.$nl, $row->name, $declaration, $row->categ, 'SQL_VERSION_ANSI', $description ); #break; } } #die(); // Sort alphabetically by function name asort($fstruc); // produce output $counter = 0; foreach( $fstruc as $func ) { echo ' // Function nr. '.++$counter.$nl; echo $func; }