替换字符串有什么问题? [关闭]

Can anyone help me with this:

<?php
$remove = $_GET['hwid'];
str_replace($_GET['hwid']."<br />","",$str);
?>

It doesnt even delete the text...

I Know i dont have it set to the html file i have thats because i don't know how to with this string...

Let's say you have this as you retrieved text (whether from html or any other form):

$str="THE HTML FILE:

Test

Test1

Test2

Test3";

this function will remove "Test2" from the string:

$newstr=str_replace("Test2","",$str);

for more information of the function take a look at here

Just one more thing, if you have <br> after each line in your example, you need to do the same for those too.