Problem with str_replace

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ChrisF79
Forum Commoner
Posts: 26
Joined: Tue Apr 01, 2008 8:26 pm

Problem with str_replace

Post by ChrisF79 »

This is driving me absolutely nuts! I have a variable named $garage_spaces with a value of "3 - Attached" and I just want to get the   out of there so I can store it in MySQL. I tried:

Code: Select all

$garage_spaces = str_replace(" ","hmm",$garage_spaces);
That still results in the   being there! Any help would be greatly appreciated!
ChrisF79
Forum Commoner
Posts: 26
Joined: Tue Apr 01, 2008 8:26 pm

Re: Problem with str_replace

Post by ChrisF79 »

Disregard this post... this isn't what was causing my problem afterall.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Problem with str_replace

Post by AbraCadaver »

ChrisF79 wrote:Disregard this post... this isn't what was causing my problem afterall.
These aren't the droids we're looking for???
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply