<?php
/**
 * Example: Search Configuration Values
 * 
 * This example demonstrates how to search for specific configuration
 * values and display the results.
 */

// Include the BetterPhpInfo class
require_once 'BetterPhpInfo.php';

// Create instance
$betterPhpInfo = new BetterPhpInfo();

/**
 * Print array as readable HTML output
 * 
 * @param array $array Array to display
 * @param string $title Optional title
 */
function print_array($array, $title = 'Array') {
    echo "<h3>$title</h3>";
    echo "<pre style='background: #f5f5f5; padding: 10px; border: 1px solid #ddd; border-radius: 4px;'>";
    print_r($array);
    echo "</pre><br>";
}

// Example search
$searchTerm = 'memory';
echo "<h2>Search Example</h2>";
echo "Searching for: <strong>$searchTerm</strong><br><br>";

$results = $betterPhpInfo->search($searchTerm);
print_array($results, "Search Results for '$searchTerm'");
?>

