How to Redirect to Another Website Using PHP

To redirect to another website in PHP, we make use of header function.  Sample code is given below:

<?php

header('Location: http://www.google.com/');
exit;

?>