I have a piece of html code {code ...} I need to get the image address in src, and it's not something like this... after I use a regular expression, {code ...} the returned content is {code ...} what I need is a clean image address... localhostwp-cont... I have a piece of html code.
<\/p>\n
<\/p>\n"
I need to get the image address in src, and it's not something like...
After I use a regular expression
$preg = '//i';
The returned content is
"\\\"http:\/\/localhost\/wp-content\/uploads\/2016\/02\/20160212050312_659.png"
What I need is a clean image address... http: // localhost/wp-content/uploads/2016/02/20160212050312_659.png
What should I do.
Reply content:
I have a piece of html code.
<\/p>\n
<\/p>\n"
I need to get the image address in src, and it's not something like...
After I use a regular expression
$preg = '//i';
The returned content is
"\\\"http:\/\/localhost\/wp-content\/uploads\/2016\/02\/20160212050312_659.png"
What I need is a clean image address... http: // localhost/wp-content/uploads/2016/02/20160212050312_659.png
What should I do.
Http://php.net/manual/en/function.stripcslashes.php