1
我想獲得輸出「蘋果」,因爲它在span標記裏面有一個叫做水果的id。那麼應該在該回調函數中寫入哪些代碼?ob_start回調函數提取輸出 - PHP
<?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();
?>
如何刪除這個 「串(6)」,我想只有 「蘋果」。 – 2011-03-17 06:16:27
大聲笑,沒關係。謝謝 :) – 2011-03-17 06:23:54