With PHP, how can I isolate the contents of the src attribute from $foo? The end result I\'m looking for would give me just \"http://example.com/img/image.jpg\"
Here's what I ended up doing, although I'm not sure about how efficient this is:
$imgsplit = explode('"',$data); foreach ($imgsplit as $item) { if (strpos($item, 'http') !== FALSE) { $image = $item; break; } }