Hallo Kalle_B.
$a=array(
'%{Datensatz1}',
'%{Datensatz2}',das %-Zeichen sagt mir nichts.
Muss es auch nicht, da dies nur eine Beispiel-Zeichenkette war.
Du könntest ebenso gut schreiben:
$a = array(
'Þ@ł€¶ŧ-1',
'Þ@ł€¶ŧ-2',
'Þ@ł€¶ŧ-3',
);
Wobei sowohl hier als auch in XaraX' Code Redundanz auftritt.
Besser ist deshalb meiner Meinung nach Folgendes:
$str_file = file_get_contents('xyz.tpl');
for ($int_i = 0; $int_i < anzahl_von_wasauchimmer(); $int_i++) {
$str_file = str_replace('%{Datensatz'.$int_i.'}', $b, $str_file);
}
echo $str_file
Einen schönen Dienstag noch.
Gruß, Ashura
--
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
mathbr:del.icio.us/ mathbr:w00t/
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
mathbr:del.icio.us/ mathbr:w00t/