<?php
// Function to limit text to 5 words
function limitToFiveWords($text) {
    $words = explode(' ', $text);
    if (count($words) > 2) {
        return implode(' ', array_slice($words, 0, 2)) . '...';
    }
    return $text;
}
function limitToTentheWords($text) {
    $words = explode(' ', $text);
    if (count($words) > 20) {
        return implode(' ', array_slice($words, 0, 20)) . '...';
    }
    return $text;
}
?>