echo $_session php code example Example 1: echo session print_r($_SESSION); Example 2: $_SESSION php example <?php session_start(); echo session_id(); ?>