$people = array(); foreach ($data['searchResults']['nameValuePairs'] as $key => $value) { $people[$key] = $value; foreach ($people as $person) { foreach ($person['nameValuePair'] as $pair) { if (isset($pair['name'])) { $name = $pair['name']; } else { $name = null; } if (isset($pair['value'])) { $value = $pair['value']; } else { $value = null; } $data['searchResults'][$key][$name] = $value; } } } unset($data['searchResults']['nameValuePairs']); return $data; } else { return $data; } } } /* Start the NeonCRM Session */ $neon = new Neon(); $keys = array('orgId' => $neonId, 'apiKey' => $neonKey); $neon->login($keys) or die("Failed to login to the NeonCRM System with OrgID " . $orgId . ". Check the login/API settings in .ht_neon.php! Error returned: " . $neon['responsemessage']);
<?php require_once '.ht_neon.php'; require_once 'neon.php'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>NeonCRM Test</title> </head> <body> <?php echo "<p>hi</p>\n"; $neon = new Neon(); $keys = array('orgId' => $neonId, 'apiKey' => $neonKey); $neon->login($keys); $request = array('method' => 'common/listCustomFields', 'parameters' => array('searchCriteria.component' => 'Event')); $result = $neon->go($request); echo "<pre>\n"; var_dump($result); echo "</pre>\n"; echo "<p>post.</p>\n"; ?> </body> </html>