|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
kills Smarty Elite
Joined: 28 May 2004 Posts: 493
|
Posted: Sun Jun 13, 2004 3:43 pm Post subject: Strings nach Template vars parsen |
|
|
Hallo zusammen,
ich lese strings aus meiner DB aus, die schon mit template vars belegt sind.
z.b.
Code: |
?section={ $sSection }&action=admin/login
|
wenn ich diese dem template so "assign"-e, dann sind logischerweise die variblen nicht durch ihre werte ersetzt, sondern es stehen noch die variablennamen im source.
wie kann ich diesen string parsen, damit die variablen durch ihre werte ersetzt werden? |
|
Back to top |
|
coach Smarty Regular
Joined: 03 Jun 2004 Posts: 65
|
Posted: Mon Jun 14, 2004 9:13 pm Post subject: Re: Strings nach Template vars parsen |
|
|
Hallo,
Code: |
?section={ $sSection }&action=admin/login
|
Wie wäre es, wenn du vor dem assignen die Variablen ersetzt, z.B. mit sprinft. http://de3.php.net/manual/de/function.sprintf.php
Oder per regulärem Ausdruck (auch vor assign) alle $name durch ihren Wert ersetzen.
Maik |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|