NameSilo

String and variables

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

lovelinuxlove

Established Member
Impact
2
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 ....
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
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
 
0
•••
How are the variables formatted in your text file?

Are they "$var = value" or are they just a bunch of names that you need to get into variables or something else?
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back