02-09-2010, 05:45 PM
|
#2 (permalink)
|
|
The Wanderer
Join Date: Sep 2009
Posts: 15
Thanks: 4
|
You could use preg_replace_callback() to replace that part with a gallery:
PHP Code:
<?php
function gallery($path_to_images)
{
// do something and return it:
return;
}
$text = 'Hello world!
{gallery=/path/to/images}
Another world!';
$new_text = preg_replace_callback('/^{gallery=(.*?)}$/', 'gallery', $text)
Not tested...
|
|
|
|