News

Endnotes and Footnotes in PHPdocx

  • May 03, 2011

A note is a string of text placed at the bottom of a page in a book or document or at the end of a text. The note can provide an author's comments on the main text or citations of a reference work in support of the text, or both. A footnote is normally flagged by a superscripted number immediately following that portion of the text the note is in reference to.
The first idea for the first footnote on the page, the second idea for the second footnote, and so on.
In PHPdocx is easy to generate this kind of text using the proper code:


require_once('../../classes/CreateDocx.inc');

$docx = new CreateDocx();

$docx->addEndnote(
array(
'textDocument' => 'Lorem ipsum dolor sit amet',
'textEndNote' => 'endnote'
)
);

$docx->addFootnote(
array(
'textDocument' => 'Lorem ipsum dolor sit amet',
'textEndNote' => 'footnote'
)
);

$docx->createDocx('example_endnote_footnote');