Look at this (it presumes you only have once occurrence of #O UD and #C UD).
PHP Code:
<?PHP
/* the name of your file */
$file_name = "whatever.txt";
/* read the file contents into a string */
$contents = file_get_contents($file_name);
$beg_of = "#O UD";
$end_of = "#C UD";
/* remove all occurences of #O UD */
$contents = str_replace($beg_of, "", $contents);
/* remove all occurences of #O UD */
$contents = str_replace($end_of, "", $contents);
/* convert content to an array */
$lines = explode("\n", $contents);
/* remove first element as it is empty */
array_shift($lines);
/* remove last element as it is empty */
array_pop($lines);
/* create new content from the array */
$new_content = implode("\n", $lines);
/* do whatever you want with the results */
echo nl2br($new_content);
?>
Bookmarks