Skip to content

Instantly share code, notes, and snippets.

View abarke's full-sized avatar
💭
You can never learn less, you can only learn more!

Alex Barker abarke

💭
You can never learn less, you can only learn more!
View GitHub Profile
@abarke
abarke / docx_editor.php
Last active December 1, 2023 14:02 — forked from AndrewChamp/docx_editor.php
Edit a Microsoft Word .docx file using PHP and the zip extension.
View docx_editor.php
<?php
$input = 'original.docx';
$output = 'modified.docx';
$replacements = [
'{test-placeholder-1}' => 'test successful 1',
'{test-placeholder-2}' => 'test successful 2',
'{test-placeholder-3}' => 'test successful 3',
'{test-placeholder-4}' => 'test successful 4',
];