I'm using Wordpress' CMS for my website, I want to display recent blog posts, but without the HTML tags which are within the post. I have tried the following, but to no avail.
$content = the_content();
$content = strval($content);
echo strip_tags($content, '<p><a>');
Which returns the following error:
Parse error: syntax error, unexpected 'the_content' (T_STRING) in C:\xampp\htdocs\wp\wp-content\themes\My-theme\index.php on line 25