Capture The Echo Php

[Solved] Capture The Echo Php | Php - Code Explorer | yomemimo.com
Question : capture the echo php

Answered by : motionless-mole-r5nxwsa9h3y9

<?php
ob_start(); // Start output buffering
Render::UnorderedList(Class::getItems(), Class::getFields(), true);
$list = ob_get_contents(); // Store buffer in variable
ob_end_clean(); // End buffering and clean up
echo $list; // will contain the contents ?>

Source : https://stackoverflow.com/questions/3917057/possible-to-capture-php-echo-output | Last Update : Tue, 16 Jun 20

Answers related to capture the echo php

Code Explorer Popular Question For Php