Use variables, functions ect. in a textfile

From: Date: Wed, 24 Jan 2001 12:49:12 +0000
Subject: Use variables, functions ect. in a textfile
Groups: php.general 
Request: Send a blank email to php-general+get-36405@lists.php.net to get a copy of this message
Hi all, 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. Best regards /henrik

« previous php.general (#36405) next »