Jump to content

[SOLVED] str_replace


DJTim666

Recommended Posts

I am just wondering if it is possible to use str_replace(); to replace 2 variables before updating a database.

 

e.g;

 

<?php

$post = $_POST['something'];
$post2 = $_POST['something_else'];
$string = array("hello");
$replace_string = array("hi");

str_replace($string, $replace_string, $post, $post2);

?>

 

Will this work?

 

--

DJ

Link to comment
https://forums.phpfreaks.com/topic/68301-solved-str_replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.