searchAndReplace
- getTemplateVariables
- getTemplateVariablesType
- processTemplate
- removeVariableAudio
- removeVariableImage
- removeVariableText
- removeVariableVideo
- replaceVariableAudio
- replaceVariableHtml
- replaceVariableImage
- replaceVariableList
- replaceVariablePptxFragment
- replaceVariableTable
- replaceVariableText
- replaceVariableVideo
- setTemplateSymbol
searchAndReplace
ADVANCED / PREMIUM
BASIC
Searches and replaces texts in a PowerPoint presentation.
Description
public searchAndReplace($source, $target, $data, $options = array())
This method allows the substitution of plain strings in a PPTX presentation.
This method doesn't use the template engine included in phppptx. We recommend using replaceVariableText to do text replacements.
Parameters
source
The path to the source PPTX file.
target
The path to the PPTX file resulting after the text replacement.
data
The data to be replaced.
options
| Key | Type | Description |
|---|---|---|
| slideNumber | array | Slide numbers to replace the texts. All if not set. |
Code samples
Example #1
Release notes
- phppptx 1.0:
- new method.