![]() |
How to take only the path?
I using CKFinder to let user browse the files from server to get path location of file direct to input form.
The problem is where the value of input form become like this: PHP Code:
PHP Code:
Thanks for help |
Quote:
1. It always will start with http:// 2. It always ends with " So basically what you need to do find the occurrence of every http:// and find the quote directly after it then take the contents between those positions. I haven't tested this, but something like the following should work PHP Code:
|
Thanks you very much Village Idiot :)
|
A regular expression would work as well.
#<img.+src=(?:"|')(.*?)(?:"|').+/>#iI haven't fully tested but that should match only in image tags and " or ' could be used. |
| All times are GMT. The time now is 09:10 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0