Posted By

Balamir on 01/19/14


Tagged

php function Reading estimated


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

riacharda


estimated reading time function (modified)


 / Published in: PHP
 

URL: http://provode.com/2013/11/copying-mediums-estimated-reading-time/

used ceil instead floor

  1. function read_time($text){
  2. $words = str_word_count(strip_tags($text));
  3. $min = ceil($words / 200);
  4. return $min . ' min read';
  5. }

Report this snippet  

You need to login to post a comment.