Login +

Documentation

SLS_String::countParagraphs

Since SillySmart 1.0

Description

Count the number of paragraphs in a string
static int countParagraphs ( string $string);

Parameters

  • string $string
    the string to count

Return

int
the number of paragraphs

Exemples

  •  var_dump(SLS_String::countParagraphs(
     "SillySmart is a lightweight and flexible MVC Framework written in PHP5.
     It's based on XML/XSL's parsing."
     ));
     // will produce : 2

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.