PHP Classes

File: textdemo.php

Recommend this page to a friend!
  Classes of Timothy Edwards   PHP DOCX to Text   textdemo.php   Download  
File: textdemo.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP DOCX to Text
Extract text from Microsoft Word DOCX files
Author: By
Last change:
Date: 2 years ago
Size: 533 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

</head>

<body>
<?php
require_once('wordtext.php');
$rt = new WordTEXT(false,'UTF-8');
$text = $rt->readDocument('sample.docx');

$det = explode(':',$text[0]);
echo
"No of text elements in the array - ".$det[0]."<br>";
echo
"Max length of a text element in the array - ".$det[1]."<br>&nbsp;<br>";
$LC = 1;
while (
$LC <= $det[0]){
    echo
"Element ".$LC." : ".$text[$LC]."<br>";
   
$LC++;
}

?>
</body>