View unanswered posts | View active topics It is currently Fri Aug 18, 2017 5:57 am



Reply to topic  [ 4 posts ] 
 build a string .. 
Author Message
Junior Member

Joined: Thu Nov 17, 2011 3:01 am
Posts: 2
Post 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
Report this post
Profile
Junior Member

Joined: Thu Nov 17, 2011 3:01 am
Posts: 2
Post Re: build a string ..
str_replace() has done the job nicely.


Thu Nov 17, 2011 3:47 am
Report this post
Profile
Junior Member

Joined: Thu Oct 18, 2012 8:15 pm
Posts: 2
Post 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
Report this post
Profile
Junior Member

Joined: Thu Oct 18, 2012 8:15 pm
Posts: 2
Post Re: build a string ..
yup


Sat Oct 20, 2012 10:14 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 4 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

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.