您好我从这样的数据库(joomla)获取文章
$db->setQuery("SELECT id, title, introtext, `fulltext` FROM #__content WHERE catid = 33 AND state = 1 ORDER BY ordering asc, id desc");
$json->data = $db->loadObjectList();
所以$json->data
包含以下信息:
<p>example parahraph </p><img src="/images/example.jpg"><p>example paragraph</p><h1>example heading</h1>
我想在文本中找到图片(src =“”)并将/images/example.jpg替换为http://example.com/images/example.jpg