I draw contents from a database. Some of the texts contain a footnote, which is formatted using a div class. Following the HTML of this:
<div class=""footnotes"">
<br>
<hr align=""left"" noshade=""noshade"" size=""1"" width=""150"" />
<blockquote> <a href=""#f1"" name=""fn1""> <span class=""superscript""> * </span>
</a>Some footnotetext</blockquote></div>
Since my bibliography uses data from the database as well, the footnote now appears before the references, but I would like it at the very bottom of the page. I was thinking of using preg_replace in order to separate the textfield into two variables, one for the text itself, the other one for the footnote (it is always just one) and integrate after the bibliography is compiled.
Unfortunately, it seems that the preg_replace does not work. It always displays the whole content of the textfield. Here's the PHP:
$text = preg_replace('/(.*)(\div class=\"footnotes\"\>.*?\<\/div\>)/s', '$1', $result['text']);$footnote = preg_replace('/(.*)(\div class=\"footnotes\"\>.+?\<\/div\>)/s', '$2', $result['text']);
echo '<div align="justify"><span style="font-family:Georgia;font-size:16px;">' . $text;
***BIBLIOGRAPHY***
...
echo $footnote;
Maybe someone has an idea how to deal with that. I tried it on phpliveregex. There search string works fine. Many thanks for any help.