Cacus
12-04-2008, 10:48 AM
Hi All
Wonder if you can help. I have the following replacement function:
function divider_insert($text) {
$dividers = array (
"ooOoo" => '<&pb(46,6.001,b,0,K,100,"Solid",n,100,1,m,100.877,100.877,0,1.578,0,0,"'.$BMDs_Artwork_Location.'Divider_01_xtags",,"")>'
);
foreach ($dividers as $k => $v)
{
$text = preg_replace("/\b$k\b/i",$v,$text);
}
return $text;
Now the string $BMDs_Artwork_Location is located in a master settings file. However the above simply replaces the text ooOoo with <&pb(46,6.001,b,0,K,100,"Solid",n,100,1,m,100.877,100.877,0,1.578,0,0,"Divider_01_xtags",,"")>
and does not insert the value of the string ($BMDs_Artwork_Location) into the array. Is it possible to do what I'm after?
The value of the string ($BMDs_Artwork_Location) is simply "c:/artwork/", what essentially is a path to the file Divider_01_xtags but want to set the path in my master settings.
Therefore the above should replace ooOoo with:
<&pb(46,6.001,b,0,K,100,"Solid",n,100,1,m,100.877,100.877,0,1.578,0,0,"c:/artwork/Divider_01_xtags",,"")>
Cheers
Steve
Wonder if you can help. I have the following replacement function:
function divider_insert($text) {
$dividers = array (
"ooOoo" => '<&pb(46,6.001,b,0,K,100,"Solid",n,100,1,m,100.877,100.877,0,1.578,0,0,"'.$BMDs_Artwork_Location.'Divider_01_xtags",,"")>'
);
foreach ($dividers as $k => $v)
{
$text = preg_replace("/\b$k\b/i",$v,$text);
}
return $text;
Now the string $BMDs_Artwork_Location is located in a master settings file. However the above simply replaces the text ooOoo with <&pb(46,6.001,b,0,K,100,"Solid",n,100,1,m,100.877,100.877,0,1.578,0,0,"Divider_01_xtags",,"")>
and does not insert the value of the string ($BMDs_Artwork_Location) into the array. Is it possible to do what I'm after?
The value of the string ($BMDs_Artwork_Location) is simply "c:/artwork/", what essentially is a path to the file Divider_01_xtags but want to set the path in my master settings.
Therefore the above should replace ooOoo with:
<&pb(46,6.001,b,0,K,100,"Solid",n,100,1,m,100.877,100.877,0,1.578,0,0,"c:/artwork/Divider_01_xtags",,"")>
Cheers
Steve