View Single Post
Old 02-17-2009, 02:12 PM   #4 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

The .+? says any character but white space, and find all those characters, but in non-greedy form, so when it finds the less than symbol "<" it will stop capturing.

For the appending of the URL to the image path, you could try something like the following:

php Code:
$aImages = array('/path/to/image.jpg', '/path/to/image.gif');
$szFunction = create_function('$s', 'return "http://www.talkphp.com" . $s;');
$aImages = array_map($szFunction, $aImages);
die(print_r($aImages, true));
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote