Mailinglisten-Archive |
Und um ganz sicher zu gehen:
$template = file_get_contents ( 'path/to/your/template' );
preg_match_all ('/{(\.+?)}/', $template, $array, PREG_SET_ORDER );
foreach ( $array AS $key )
{
if ( array_key_exists ( $key[1], $yourValueArray ) )
{
$template = str_replace (
'{'.$key[0].'}',$yourValueArray[$key[0]],$template );
} else
{
$template = str_replace ( '{'.$key[0].'}', '', $template );
}
}
grüße
andreas
--
wdv Medien & Kommunikation GmbH & Co. OHG
Mediendatenverarbeitung
Andreas Heigl
Siemensstrasse 6
61352 Bad Homburg
Germany
Telefon +49-(0)6172-670-185
Telefax +49-(0)6172-670-181
www.wdv.de
php::bar PHP Wiki - Listenarchive