To pass the tid as an array value in callback funtion Am using drupal 7 site,am using a callback function to get the nodes list tagged to the particular tid,  the process is if i gave the tid value 25 it must return the nodes list which are tagged to this tid.As far this it is working fine.I wish to give the tid as multiple values ie as an array value, the thing am expecting is , if I give 25,17,28 (these are tid values) the result must be the nodes tagged to these tid's .Below is my function

'actions' =&gt; array(
        'selectNodes' =&gt; array(
          'file' =&gt; array('type' =&gt; 'inc', 'module' =&gt; 'services', 'name' =&gt; 'resources/taxonomy_resource'),
          'help'   =&gt; t('Returns all nodes with provided taxonomy id.'),
          'access arguments' =&gt; array('access content'),
          'callback' =&gt; 'taxonomy_service_select_nodes',
          'args'     =&gt; array( 
            array(
              'name'         =&gt; 'tid',
              'type'         =&gt; 'string',
              'description'  =&gt; t('The vocabulary ids to retrieve, separated by comma.'),
              'source'       =&gt; array('data' =&gt; 'tid'),
              'optional'     =&gt; FALSE,
            ),
            array(
              'name'         =&gt; 'pager',
              'type'         =&gt; 'int',
              'description'  =&gt; t('Whether the nodes are to be used with a pager (the case on most Drupal pages) or not (in an XML feed, for example).'),
              'source'       =&gt; array('data' =&gt; 'pager'),
              'optional'     =&gt; TRUE,
              'default value'=&gt; TRUE,
            ),
            array(
              'name'         =&gt; 'limit',
              'type'         =&gt; 'int',
              'description'  =&gt; t('Maximum number of nodes to find.'),
              'source'       =&gt; array('data' =&gt; 'limit'),
              'optional'     =&gt; TRUE,
              'default value'=&gt; FALSE,
            ),
            array(
              'name'         =&gt; 'order',
              'type'         =&gt; 'int',
              'description'  =&gt; t('The order clause for the query that retrieve the nodes.'),
              'source'       =&gt; array('data' =&gt; 'order'),
              'optional'     =&gt; TRUE,
              'default value'=&gt; array('t.sticky' =&gt; 'DESC', 't.created' =&gt; 'DESC'),
            ),
          ),
        ),
      }


can anyone please tell me how can I pass this tid value as array to the callback function used here?
I am sharing here some dummy data with you, it might help you.



{
    "tid": "25,17,28",
    "pager": 1,
    "limit": 5,
    "order": "desc"
}

 

   array(
                  'name'         =&gt; 'order',
                  'type'         =&gt; 'string', // it should be string because it can be either ASC or DESC
                  'description'  =&gt; t('The order clause for the query that retrieve the nodes.'),
                  'source'       =&gt; array('data' =&gt; 'order'),
                  'optional'     =&gt; TRUE,
                  'default value'=&gt; array('t.sticky' =&gt; 'DESC', 't.created' =&gt; 'DESC'),
                ),


// Call back function 

function taxonomy_service_select_nodes($tid, $pager, $limit, $order) {
  $tid_collection = array();
  $tid_collection = explode(',', $tid); // Here your tids are in array format and you can use in your code accordingly.
  echo $pager;
  echo $limit;
  echo $order;
}