<?php

    function nota_prensa ($text, $limit = 30, $id)
    {
        $text = strip_tags($text); //quitando tags HTML
        if (strlen($text) > $limit) {
            $words = str_word_count($text, 2);
            $pos = array_keys($words);
		    $end ='<a class="navega2" href="Detalles_Prensa.php?id='.$id.'"> [...] </a>';
            $text = substr($text, 0, $pos[$limit]) . $end;
        }
        return $text;
    }
	   function nota_prensa_ingles ($text, $limit = 30, $id)
    {
        $text = strip_tags($text); //quitando tags HTML
        if (strlen($text) > $limit) {
            $words = str_word_count($text, 2);
            $pos = array_keys($words);
		    $end ='<a class="navega" href="Press_Details.php?id='.$id.'"> [...] </a>';
            $text = substr($text, 0, $pos[$limit]) . $end;
        }
        return $text;
    } 
	
	
	?>