PHP to List mdd labels

Here is some code to list the variables in an MDD

 

<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

//phpinfo();
echo 'Start';
// Create the MDM object and open the Short Drinks .mdd file in read-write mode

$oMDM = new COM("MDM.Document") or die("Unable to instantiate MDM.Document"); 
$oMDM->Open("C:\\inetpub\\wwwroot\\IBV_USERS.mdd", '', 2);
foreach ($oMDM->Variables as $oVar) {
echo $oVar->Label ."<br/>";
}


echo 'Done';

?>
%d bloggers like this: