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 September 2, 2024 11:13 — forked from AndrewChamp/docx_editor.php
Edit a Microsoft Word .docx file using PHP and the zip extension.
<?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',
];