我想获得输出“Apples”,因为它在 span 标签内,其 id 称为fruit。那么在那个回调函数中应该写什么代码呢?
<?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();
?>