I would like to get output "Apples", because it is inside of span tag which has id called fruit. So what codes should be written in that callback function?
<?php
function callback($buffer) {
// get the fruit inHTML text, the output should be "Apples" only
....
....
}
ob_start("callback");
?>
<html>
<body>
<p>It's like comparing <span id="fruit">Apples</span> to Oranges.</p>
</body>
</html>
<?php
ob_end_flush();
?>