Return to Snippet

Revision: 32398
at September 23, 2010 17:21 by sayber


Initial Code
function CountWord ($count, $str)
{
    
    $articles = explode(' ', $str);
          
    for ($i = 0; $i <= $count; $i++)
    {
        $text .= $articles[$i].' '; 
 
    }
        
    return $text; 
}

Initial URL


Initial Description
/**
* Функция выводит указанае кол-во слов  
* 
* @param int $count количество слов которое надо вывести
* @param string $str  текст
*/

Initial Title
Вывод определенного кол-ва слов

Initial Tags


Initial Language
PHP