| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Account Closed | String and variables Hello , I got a .txt file , and inside the .txt file I got lot's of variables ... and I am reading that .txt file into a PHP program , because I would like to send it as a e-mail ... my problem is that my variables are sent as text, and not variables , someting like "Welcome on board $username" and not "Welcome on board John46" How I can process a string ? I know that there is a simple function for this , I even used it in the past but I forgot it , and now is so hard for me to find it again .... |
| |
| | #2 (permalink) |
| Senior Member | dont know of any particular function that does that but it sounds like you need a template system such as the pear HTML_Template_IT located at http://pear.php.net/package/HTML_Template_IT If you use 1 like this then your text file would need to be like Welcome on board {name} the template system would replace {name} with the persons name
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |