replaceVariableText

replaceVariableText

BASIC / ADVANCED / PREMIUM

Replaces placeholder variables with text.

Description
public replaceVariableText($variables, $options = array())

This method replaces a set of placeholder variables with plain text.

Remember that the phppptx template variables should be surrounded by $ symbols or whatever symbol you have chosen via the setTemplateSymbol method.

Parameters

variables

Array with the names of the placeholder template variables as keys and the plain texts that should replace them as values.

options

The possible keys and values of this array are:

Key Type Description
activeSlide bool If true, get only the active slide. Default as false.
target string slides (default).
Code samples

Example #1

The resulting PPTX looks like:

Release notes
  • phppptx 1.0: new method.