This the code to get the full description or content of the feed. However I would only like the first 15 characters from the start. Is my code correct?
The problem is that you have HTML tags wrapping your text. So you actually have more than 15 characters including the HTML markup. You can strip the HTML out first using strip_tags() to get just 15 characters of text:
Alternately if you want to keep the HTML markup, you would have to get the opening tag and then do a forward lookup of the ending tag, get the position in the string, and truncate anything after that.
The problem is that you have HTML tags wrapping your text. So you actually have more than 15 characters including the HTML markup. You can strip the HTML out first using strip_tags() to get just 15 characters of text:
Alternately if you want to keep the HTML markup, you would have to get the opening tag and then do a forward lookup of the ending tag, get the position in the string, and truncate anything after that.