Beispiel #1
0
function mc_format_api($data, $format)
{
    switch ($format) {
        case 'json':
            mc_format_json($data);
            break;
        case 'rss':
            mc_api_format_rss($data);
            break;
        case 'csv':
            mc_format_csv($data);
            break;
    }
}
function mc_format_api($data, $format)
{
    $output = '';
    switch ($format) {
        case 'json':
            $output = mc_format_json($data);
            break;
        case 'rss':
            $output = mc_api_format_rss($data);
            break;
        case 'csv':
            $output = mc_format_csv($data);
            break;
    }
    return $output;
}