Find the number of results in a view. Add this snippet to the header or footer of the view, depending on where you want the number of results to be displayed.
From: http://drupal.org/node/131031
$view = views_get_current_view(); // execute view query $view->execute(); // results are now stored as an array in $view->result $count = count( $view->result ); print "Showing <b>$count</b> results";
Does Drupal development make your head explode and drive you crazy?
Why not learn from someone who has paved the way instead?
Sign up to my upcoming learning series.
I am Blair Wadman and this is where I write about Drupal, PHP, CSS etc
© Blair Wadman
2005 - 2011
Your code really helped me alot....it saved much of my time...
Thank you very much....
Post new comment