Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($details as &$row) {
- $content = &$row['content'];
- $images = $row['images'];
- if (preg_match_all('/\IMAGE\|(\d+)/', $content, $matches)) {
- foreach ($matches[1] as $id) {
- foreach ($images as $image) {
- if ($image['id'] == $id) {
- $contentz[] = str_replace('<!--IMAGE|' . $id . '-->', $image['filename'], $row['content']);
- }
- }
- }
- }
- }
- print_r($contentz);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement