PHP Function Reference

PHP output_reset_rewrite_vars() Function



The PHP output_reset_rewrite_vars() function resets the URL rewriter values and removes all rewrite variables previously set by the output_add_rewrite_var() function.

Syntax

output_reset_rewrite_vars()

Parameters

No parameter is required.

Return Value

Returns true on success or false on failure.

Example: output_reset_rewrite_vars() example

The example below shows the usage of output_reset_rewrite_vars() function.

<?php
session_start();
output_add_rewrite_var('var', 'value');

echo '<a href="/index.php">link</a>';
ob_flush();

output_reset_rewrite_vars();
echo '<a href="/index.php">link</a>';
?>

The output of the above code will be:

<a href="/index.php?PHPSESSID=xyz&var=value">link</a>
<a href="/index.php">link</a>

❮ PHP Output Control Reference