This:
$up_path = str_replace("'","",$up_path);
Doesn't work. I did a search in the forums.. no luck. Not sure whats going on, because every other character I have in STR_REPLACE works fine :/
This:
$up_path = str_replace("'","",$up_path);
Doesn't work. I did a search in the forums.. no luck. Not sure whats going on, because every other character I have in STR_REPLACE works fine :/
what's the value for $up_path? I just tested the following code
<?
$up_path = "john's";
echo $up_path . "<br>\n";
$up_path = str_replace("'","",$up_path);
echo $up_path;
?>
Which echo'd
john's
johns
like it should.
Cgraz
"Columbine, Mckana's Mix" is the value. For some reason, it skips the ' ...
Copy and paste the following code, save it as it's own php file, and upload it to your server. It works just fine for me. If you can get this to work, then the problem is probably elsewhere in your code
<?
$up_path = "Columbine, Mckana's Mix";
echo $up_path . "<br>\n";
$up_path = str_replace("'","",$up_path);
echo $up_path;
?>
Cgraz
That's odd.. heres basically what it does:
Variable comes in as:
COLUMBINE, McKANA’S MIX
And goes through:
$up_path = str_replace(" "," ",$add_plant_name);
$up_path = str_replace(" / ","_",$up_path);
$up_path = str_replace(" - ","",$up_path);
$up_path = str_replace(" ","_",$up_path);
$up_path = str_replace("/","",$up_path);
$up_path = str_replace(",","",$up_path);
$up_path = str_replace("'","",$up_path);
$up_path = htmlspecialchars($up_path);
$up_path = strtolower ($up_path);
Looks like this when done:
Columbine, Mckana's Mix
i think i found your error
you use
$up_path = str_replace("'","",$up_path);
replacing all '
but in the name it is a ´
you also need to replace the ´
I'm a dope. shoots self
I'll just took it out and added what I need in phpMyAdmin, but I have about 400 more plants to go, so I'm sure I'll find another one like that, thanks !
Edit: Nope, didn't fix it.
Update: I found the problem. There was an escape slash in the string. Whoops. So \' worked. Funny, but it fixed it..
(sorry for double post.. just wanted to let people know how I fixed it)