<?php
if (!defined("WHMCS")) {
	exit("This file cannot be accessed directly");
}

$apiresults['test'] = 1; 

$result = select_query("tblproductgroups");
$apiresults = array("result" => "success", "totalresults" => mysql_num_rows($result));

while ($data = mysql_fetch_array($result)) {
	$productarray = array("gid" => $data['id'], "name" => $data['name'], "headline" => $data['headline'], "order" => $data['order'] );
	$apiresults['groups'][] = $productarray;
}
?>