Getting started


// open document sample.docx
$doc = new PNDocx("templates/sample.docx");

// replace all {#some} with the text following
$doc->replace("some", "Simple replacement of key-value pais");

// save document to disk
$doc->save("final.docx");

// redirect browser so see the sample
header("Location: final.docx");

Show the result
templates/sample.docx

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.