![enter image description here]It reads whole document text but i want the code which reads specific text from word document. for eg. Consider there are few form fields say Name: and the text box i want to read only the value from that text box and not as Name:abc only abc should be returned. any help will be appreciated.
<?php
$filename = "doc.docx";
$zip = new ZipArchive();
if( $zip->open( $filename, ZIPARCHIVE::CHECKCONS ) !== TRUE )
{
echo 'failed to open template';
exit;
}
$file = 'word/document.xml';
$data = $zip->getFromName($file);
$doc = new DOMDocument();
$doc->loadXML( $data );
echo $data;
?>