Posted By

inreflection7 on 12/23/11


php replace String

Versions (?)

Replace string in PHP

 / Published in: PHP

Search for a string, if matched replace with second provided paramater. Third parameter is the variable whose value is the string you'd like to search.

  1. <?PHP
  2. $name = $_POST[name];
  3. $pagelink = str_replace(" ","_",$name);
  4. ?>

Report this snippet  

You need to login to post a comment.