addCrossReference

addCrossReference

BASIC / ADVANCED / PREMIUM

Inserts a cross-reference into the Word document.

Description
public addCrossReference (string $text, [array $options = array()] )

This method allows the insertion of cross-references into a Word document.

Parameters
key Type Description
text string Text of the reference

options

The options array includes the following keys and values:

key Type Description
type string The bookmark type. Possible values are 'bookmark' and 'heading'.
referenceName string The name of the element to be referred.
Return values

Void.

Code samples

Example #1

The resulting Word document looks like: