これは、HTMLファイルを次のようになります。最初の<li class="msgln">hello</li>
を削除する方法開いているファイルと最初のタグを削除
$fp = fopen("file.html", 'a');
....
fclose($fp);
:
<li class="msgln">hello</li><li class="msgln">hi</li><li class="msgln">hey</li>
とPHPスクリプト?ファイルの内容が正確である場合
$html = file_get_contents('file.html');
$html = preg_replace('#^<li[^>]*>[^<]+</li>#i', '', $html);