Current Location: Home> Function Categories> output_reset_rewrite_vars

output_reset_rewrite_vars

Reset URL rewriter value
Name:output_reset_rewrite_vars
Category:Output buffer control
Programming Language:php
One-line Description:Removes all variables added by output_add_rewrite_var().

Definition and usage

The output_reset_rewrite_vars() function removes all variables added by output_add_rewrite_var() from the output buffer. This does not remove variables from the sent content, but prevents them from being added to the content sent after this function call.

Example

Add variable to the URL in the output:

 <?php
// Make 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 contain a variable</a><br>' ;
ob_flush ( ) ;

// Remove variables
output_reset_rewrite_vars ( ) ;
echo '<a href="">This link (URL) will not contain variables</a>' ;
?>

Try it yourself

grammar

 output_reset_rewrite_vars ( ) ;
Similar Functions
Popular Articles