![]() |
The ob_get_contents() is an inbuilt function in PHP that is used to capture what is currently being buffered by the output buffer. This function returns the output buffer. Syntaxob_get_contents(): string | false ParameterThis function does not accept any parameters. Return ValueThe ob_get_contents() function in PHP returns the contents of the output buffer as a string. If this function does not return any content buffer then it will return false. Program 1: The following program demonstrates the ob_get_contents() Function. PHP
Output: Contents of the output buffer: This is some text in the output buffer. Program 2: The following program demonstrates the ob_get_contents() Function. PHP
Output: Today's time is: 2023-07-25 Program 3: The following program demonstrates the ob_get_contents() function. PHP
Output:
|
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |