How can PHP be used to display search results with partial HTML content?

When displaying search results with partial HTML content in PHP, you can use the `strip_tags()` function to remove any HTML tags from the content before displaying it. This ensures that only the text content is shown in the search results, without any potentially harmful HTML tags.

<?php
$searchTerm = $_GET['search'];

// Your search query to retrieve results goes here

foreach ($results as $result) {
    $content = $result['content'];
    $content = strip_tags($content); // Remove HTML tags from content
    echo "<div class='search-result'>";
    echo "<h3>{$result['title']}</h3>";
    echo "<p>{$content}</p>";
    echo "</div>";
}
?>