Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*================================================================
- _ ____ _____ __ __
- (_) _ \ ___ | _ _ | _ __ __ | \ / |
- | | | _) / __ | | | / _ \ / _ `| | \ / | |
- | | __ / \ __ \ | | __ / (_ | | | | |
- |_|_| |___/ | _ | \ ___ | \ __,_|_| | _ |
- Criado por SuYaNw Dácio
- www.ips-team.blogspot.com
- Contar Quantas quebras de linha Contem na frase.
- ===============================================================*/
- function sQuebrasDeLinhas($Str) // By: [iPs]SuYaNw
- {
- /*
- Esta função verifica e conta quantas quebras de linha há em uma string.
- e returna á quantidade de quebras de linhas.
- */
- $Out = explode("\n", $Str);
- return Count($Out) -1;
- }
- // Modo de uso(opcional):
- for($i =0; $i != sQuebrasDeLinhas($String); ++$i)
- {
- echo $i;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement