addSection

addSection

BASIC / ADVANCED / PREMIUM

Inserts a new section into the PowerPoint presentation.

Description
public addSection($options = array())

This method allows the creation of new sections in the PowerPoint presentation.

A default section can be set in the new CreatePptx class:

Parameters

options

Key Type Description
allowDuplicateSectionNames bool If true creates a new section if a section with the same name already exists. Default as false.
name string Section name. Default as 'New section'.
moveSlidesWithoutSections bool If true move slides without sections to this new section. Default as false.
position int Position. 0 is the first position. -1 (last) as default.
Code samples

Example #1

The resulting PPTX looks like:

Example #2

The resulting PPTX looks like:

Release notes
  • phppptx 2.0:
    • new method.