0

PHP DOM内でappendChildとReplaceChildを実行してから、ファイルを保存する必要があるプロジェクトに取り組んでいます。

PHPコード

<?php 
$string = '<u>technical/u>';
?>
<html><head></head>
<body>
<div>Stack Overflow is great website for technical professionals.
<p>checking all of the websites</p>
</div>
<h1>Looking something new for a technical professional</h1>
</body>
</html>

$ stringを、「technical」がとで使用されているような重複した単語に置き換えたいだけです。

最終的なHTMLコードは次のようになります

<html><head></head>
<body>
<div>Stack Overflow is great website for <u>technical</u> professionals.
<p>checking all of the websites</p>
</div>
<h1>Looking something new for a <u>technical</u> professional</h1>
</body>
</html>
4

0 に答える 0