I am trying to add a "Read More" system on my site and right now I have the text stopping after 150 words, but I can't seem to get the link right at all.
This is what I have at the end of my shortening loop:
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).'... <a href="posts.php?id='.$post['post_id'].'>Read More</a>';
When I look at my site the link points to this:
/posts.php?id=7%3ERead%20More%3C/a%3E...%3C/div%3E%3Cp%3EPosted%20on:%2030-09-14%2003:55:08in%20%3Ca%20href=
Its basically taking everything that comes after this (date and stuff) and putting it in my URL for some reason. If I just echo the post['post_id'] by itself I am getting the correct output. Any idea what I am doing wrong?