Monday, November 30, 2009

How to replace a space with an underscore in php


How to replace a space with an underscore in php

To do that, I used str_replace function in php.

Example.

$name = $_POST[name];
$pagelink = str_replace(" ","_",$name);
?>

2 comments:

  1. How to change the max file size to be uploaded in php?

    ReplyDelete
  2. in php.ini file change the upload_max_filesize= 2M

    upload_max_filesize= 2G
    if you like it.

    ReplyDelete