What alternative functions can be used instead of str_replace for manipulating session data in PHP?

When manipulating session data in PHP, instead of using `str_replace`, you can use the `$_SESSION` superglobal array directly to access and modify session variables. This allows you to easily update session data without the need for string manipulation functions.

// Accessing and updating session data without using str_replace
session_start();

// Update a session variable directly
$_SESSION['username'] = 'new_username';

// Access a session variable
echo $_SESSION['username'];