How can the values of FID and PID be outputted without using array_slice in the PHP code?

The values of FID and PID can be outputted without using array_slice in PHP by directly accessing the specific elements of the array using their keys. This can be achieved by referencing the keys of the array that correspond to FID and PID and echoing their values.

$data = array(
    "FID" => 123,
    "PID" => 456,
    "Name" => "John Doe"
);

echo "FID: " . $data["FID"] . "<br>";
echo "PID: " . $data["PID"];