replaceBlock

replaceBlock

ADVANCED / PREMIUM TRIAL

Replaces all content between two block variables from the Word document.

Description
public replaceBlock (string $blockName, mixed $value [, array $type])
Parameters

blockName

The name of the block variable.

value

New content: string or WordFragment.

type

Replacement type: block (default) or inline.

Exceptions

Method not available.

Code samples

Example #1

The resulting Word document looks like:

Example #1

The resulting Word document looks like:

Release notes
  • phpdocx 13.5:
    • new method.