İşte benim için çalışıyor DEĞİLDİR buydu:
<?php
$string = 'I have a dog and his name is <a href="http://www.jackismydog.com">Jack</a> and I love him very much because he\'s my favorite dog in the whole wide world and nothing could make me not love him, I think.';
$limited = substr($string, 0, 100).'...';
echo $string;
?>
Ben 100 karakter GÖRÜNÜR metni sınırlamak istiyorum, ama substr() da limiti olmayan görünür metin de dahil olmak üzere (<a href="http://www.jackismydog.com"> ve </a>) hangi alır kullanarak bu mevcut 100 karakterden 41 kadar.
Bağlantısından kelime "Jack" limitine dahil, fakat <a href="http://www.jackismydog.com"> veya </a> olacağını böylece metni sınırlamak için bir yolu var mı?
Edit: I want to keep the link in the string, just not count it's length towards the limit..