【发布时间】:2011-03-17 05:49:27
【问题描述】:
我想获得输出“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();
?>
【问题讨论】:
标签: php function callback ob-start