$stringa = substr($stringa,0,50);

Puoi anche non fare nessun controllo. Se la stringa è inferiore ai 50 caratteri te la restituisce tutta.