Contact Us
Hire PHP Web Developer
Syntax :
bool ob_start ([ callback $output_callback [, int $chunk_size [, bool $erase ]]] )
what it does :
This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.
Example :
<?php
function callback_function($buffer)
{
// replace all the apples with oranges
return (str_replace("hi", "hello", $buffer));
}
ob_start("callback_function");
?>
<html>
<body>
<p>Hello World, example : hi to all </p>
</body>
</html>
ob_end_flush();
Output :
Hello World, example : hello to all

0 comments:
Post a Comment