PHP output_reset_rewrite_vars() Function
❮ PHP Output Control Functions
Example
Add variables to URLs in the output:
<?php
// Make the URL rewriter affect <a href> and <form> tags
ini_set('url_rewriter.tags','a=href,form=');
// Add a variable
output_add_rewrite_var('var', 'value');
echo '<a href="">This
link (URL)
will have a variable</a><br>';
ob_flush();
// Remove the variable
output_reset_rewrite_vars();
echo '<a href="">This link (URL) will not
have a variable</a>';
?>
Try it Yourself »
Definition and Usage
The output_reset_rewrite_vars()
function removes all variables that were added by
output_add_rewrite_var() from the output buffer. This will not remove the variable from
content that has already been sent, but will prevent them from being added to content that
gets sent after this function call.
Syntax
output_reset_rewrite_vars();
Technical Details
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.3+ |
❮ PHP Output Control Functions