Comment ID in Comment field I've added a custom static field to comments. This static field is custom php code but I need to access the specific comment ID using php code in it. So how can I get the comment ID for every comment in the static php field?

Thanks
In Drupal 7 you can use the below code to get all the comments of a node using node ID

 $nid = 2;    
 // you can get nid 
 // $node = menu_get_object();
  //  $nid = $node-&gt;nid;
    $comments = db_select('comment')
              -&gt;fields('comment', array('cid'))
              -&gt;condition('nid', $nid, '=')
              -&gt;execute()
              -&gt;fetchAssoc();
    foreach($comments as $comment) {
        print your comments here
    }


Also you can check below links
https://api.drupal.org/api/drupal/includes%21common.inc/function/entity_load/7
https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/comment_get_thread/7

In Drupal 6 you can use the comment_render() ;