domoindal domoindal - 1 year ago 66
PHP Question

Removing slashes from image links in php

I'm getting some images throughout

function and I receive image links in the following format:


I've been trying with
function but do not work, the output is the same. Even I have tried with
and nothing change.

What am I doing wrong?

Answer Source

I wish I could comment...

As per the manual says

mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )

str_replace's second argument is what to replace with. You're replacing / with /.

Use str_replace('/', '', $subject);

Since OP updated his question:

Use stripslashes().

str_replace is also a possibility.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download