PHP to List mdd labels

Here is some code to list the variables in an MDD



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

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';


Leave a Comment