Mailinglisten-Archive |
Andreas Heigl schrieb:
> $template = file_get_contents ( 'path/to/your/template' );
> preg_match_all ('/{(\.+?)}/', $template, $array, PREG_SET_ORDER );
-------------------------------------------------------------^
Hier natürlich PREG_SET_ORDER
> foreach ( $array AS $key )
> {
> str_replace ( '{'.$key[0].'}',$yourValueArray[$key[0]],$template );
---------------------------------^---------------------------^
und an diesen beiden Stellen muss natürlich 1 stehen.....
grüße
andreas
--
Andreas Heigl
Siemensstrasse 6
61352 Bad Homburg
Germany
Telefon +49-(0)6172-670-185
Telefax +49-(0)6172-670-181
php::bar PHP Wiki - Listenarchive