I'm stuck I think it has something to do with the session name. I want it so it compares the log list in $key and if found a match with $index it echos out the $key it found. Basically doing this as trial so later I can work with using unset to remove that key from the list. here is the code

PHP Code:
<?php
session_start
();
    include 
'file.php';
        
$my_array = array($_SESSION['name']);
            
$fufile_get_contents("UserLog.html");
                
$lines[] = explode(' '$fu);
    foreach(
$lines as $key) {
        foreach(
$my_array as $index) {
            if(
$key === $index) {
                echo 
"$key";
            }
        }
    }
?>