>Im working on a site where we want to put all the text into text-files. Im
having troubles doing this, though. If I have a text like this "Today there
are more than XXXX users registered", and I put it in a .txt-file, how can I
execute the code wich should return the numer XXXX? Im building functions
for all returns from databases.
>
>XXXX could be something like <?PHP echo countMembers() ?>.
>
>The .txt-file is builde like this:
>
>"[H]Welcome[/H][S]Welcome to this site. We are proud to introduce you to
more than[C] echo countMembers[/C][/S][S]>Please enjoy your stay.[S]"
>
>Where [S] meaning start/end text and [C] start/end code.
>
>The reason why I want to do it this way are that someone without any
HTML/PHP-skills should be able to edit the text and it would be much easier
to build a site in different languages.
>
>Im open to other ways of doing it.

$text = str_replace("[C]", 42, $text);

Since you have just described the basic functionality of PHPlib,
FastTemplate, and about forty 'leven other Templates systems, I have to
suggest that you check them out before building YetAnotherTemplate.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to