这个问题是从这里开始的上一个问题的扩展。
我添加了一段代码来列出姓名和电话号码..
if(isset(${'Action'}) && ${'Action Type'}){
if(${'Action'} == 'get'){
if(${'Limit'} != ''){
$limit = ' LIMIT '.${'Limit'}.'';
} else {
$limit = '';
}
$i = 1;
${'Response'}['numbers'] = array();
${'Query'} = mysql_query('SELECT * FROM `crm`.`accounts` WHERE `acquired_via` = "Scrubbed account" AND `sent_to_dialer` = "0"'.$limit);
while(${'Row'} = mysql_fetch_assoc(${'Query'})){
${'Response'}['numbers']['number_'.$i] = array('Company_Name' => ${'Row'}['company_name'], 'Contact_First_Name' => ${'Row'}['contact_fname'], 'Contact_Last_Name' => ${'Row'}['contact_lname'], 'Office_Phone' => removeCHARSphone(${'Row'}['office_phone']), 'Mobile_Phone' => removeCHARSphone(${'Row'}['mobile_phone']));
$i++;
}
}elseif(${'Action'} == 'details'){
}
}
这破坏了 XML
http://lmsapi.com/?api_key=b3e04e54f0d92f8845d394b61c607d60&act=get&format=xml http://lmsapi.com/?api_key=b3e04e54f0d92f8845d394b61c607d60&act=get&format=json
但是 JSON 保持不变......