> what if I want to use html and php both, (say) foreach(view[field])
> add html div with some class? That's the only reason, i'm chasing tpl
> method. Because we can not use php itself to generate output in views.

Ok, now that I remember there is another method.

Add the following code to the bottom of your **template.php** file

    function themename_preprocess_views_view_fields($vars){
    
          if ($vars['view']->name == "view_name" && $vars['view']->current_display == "block_1"){
            $vars['fields']['title']->content = // do php or whatever you want to it here
          }
        }

 - replace **themename** with your theme name
 - replace **view_name** with your view name
 - replace **block_1** with your [machine name][1]

To add html, Ex:

    function themename_preprocess_views_view_fields($vars){
        
      if ($vars['view']->name == "view_name" && $vars['view']->current_display == "block_1"){
      $a = "Hello";
      $vars['fields']['title']->content = "<span class='others'>" . $a . " World" . "</span>";
      }
    }

**With this method your grid should remain intact.**


[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/JDJ1q.jpg