-1

I've completely lost my sense of this little snippet. What am I doing wrong?

if(isset($_POST['QuestionAsked'])) str_replace('?','',$_POST['QuestionAsked']);

I've checked the post array and it is in there. I'm just truing to remove the ? Why is my string replace not working?

TIA

4

1 回答 1

5

尝试这个

$ans="";
if(isset($_POST['QuestionAsked'])) 
    $ans=str_replace('?','',$_POST['QuestionAsked']);

$ans 应该有你想要的。

于 2013-06-15T15:33:54.230 回答