 |
|
 |
Main Menu |
|
 |
Forums |
|
 |
Programming Contest |
|
 |
Documentation
|
|
 |
Partner
Sites |
|
 |
Sponsors |
|
 |
|
|
Register •
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Author |
Message |
matleeds
Junior Member
Joined: Thu Nov 17, 2011 3:01 am Posts: 2
|
 build a string ..
HI,
coming from a .net background and picking up php as I go along, I was wondering what the best way of designing the following task is in php.
It's part of an appointmnet reminder app and the admin can amend the message that is sent out.
The default message is currently stored in a db table and displayed in a multi line box on the admin web page.
for example,
"This is a an appointment reminder for *patient name*. You have an appointment on *date* with *customer name*."
There's two parts relating to the message process.
1. Allowing the admin to amend the message (but ensuring the *variable markers* are left in tact, so I know where to stick the variables for part 2)
2. When the messages are being sent out (for each loop), inserting the *variables* into the message.
I have no problem getting hold of the *name*, *date*, *customer* for each iteration in the for each loop.
I'm sure people have done stuff like this before and in .net I would use a stringbuilder object but like i say, I'm not all that groovy on php at the mo.
I was thinking of maybe a function that accepts thats passed the message, name, date, customer or something..
thanks,
|
Thu Nov 17, 2011 3:05 am |
|
 |
matleeds
Junior Member
Joined: Thu Nov 17, 2011 3:01 am Posts: 2
|
 Re: build a string ..
str_replace() has done the job nicely.
|
Thu Nov 17, 2011 3:47 am |
|
 |
amzee75
Junior Member
Joined: Thu Oct 18, 2012 8:15 pm Posts: 2
|
 Re: build a string ..
thanks for info can you telll me how to i add two string at oppssite place http://www.centplay.com/affiliate/games_4320/
Last edited by amzee75 on Sun Oct 21, 2012 10:58 am, edited 1 time in total.
|
Fri Oct 19, 2012 5:33 am |
|
 |
amzee75
Junior Member
Joined: Thu Oct 18, 2012 8:15 pm Posts: 2
|
 Re: build a string ..
yup
|
Sat Oct 20, 2012 10:14 am |
|
 |
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
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 post attachments in this forum
|
|
|
|