Hi
I have trouble with limiting selected characters from database. I instert some html code (article) to database, then i want to show first x characters on a website...the problem is, that when I use SUBSTRING to limit character count, often happens that my selected string ends in the middle of html tag, for example I have in table:
"
<h3><span class="mw-headline">Lasers</span></h3>
<p><a title="Laser" href="http://en.wikipedia.org/wiki/Laser">Lasers</a> emitting in the yellow part of the spectrum are much less common than most other colors.
"
and it may happen that I select
"<h3><span class="mw-headline">Lasers</span></h3>
<p><a title="Laser" href="http://en.wikipedia.o
"
so I can not echo that on a website, because substring cuts it in the opened html tag. is there any way how to select something after for example tag closure? or before beginning one.
thanks for any help
I have trouble with limiting selected characters from database. I instert some html code (article) to database, then i want to show first x characters on a website...the problem is, that when I use SUBSTRING to limit character count, often happens that my selected string ends in the middle of html tag, for example I have in table:
"
<h3><span class="mw-headline">Lasers</span></h3>
<p><a title="Laser" href="http://en.wikipedia.org/wiki/Laser">Lasers</a> emitting in the yellow part of the spectrum are much less common than most other colors.
"
and it may happen that I select
"<h3><span class="mw-headline">Lasers</span></h3>
<p><a title="Laser" href="http://en.wikipedia.o
"
so I can not echo that on a website, because substring cuts it in the opened html tag. is there any way how to select something after for example tag closure? or before beginning one.
thanks for any help