Click to See Complete Forum and Search --> : [RESOLVED] Only Pulling First 2 Sentences from MySql Entry


cinematic_jesi
09-12-2008, 07:24 AM
Hey I had a question to see if this was possible.. I wasn't really sure what to google.. lol

I'm making a blog site. Its connected to a MySql database and obviously programmed in PHP.

I have a page with blog "updates" and then a read more link to view the whole blog. Currently I have a ShortBlog.. which shows up on the front page as 1 or 2 sentences.. I manually do it.. and BlogContent which is the full blog so when they click on read more it takes them to that.

I was wondering if there was a way to shorthand this.. and maybe only pull 1 or 2 sentences from BlogContent and then add the read more link?

Is there a way to do this.. or am I just hitting the ball way out in the outfield? lol

Let me know if you have any suggestions..

cinematic_jesi
09-12-2008, 07:26 AM
Okay I came up with this.. is this the best way to approach it..?

$_str = substr( $data, 0, 255 ) . '...';