I am working for a sms portal where user will submit an sms template for admin will approve that template. user will submit like

my name is # i leave in #

Admin will approve this sms template when user will sent this sms he can replace one word with # but he can not change other word or any other word anywhere. If user change or ad any thing then he will get some stop message.

User can sent like

my name is partha i leave in durgapur

user can not sent like

partha is my name i leave in durgapur

i am new in PHP i can not understand how to do this with PHp please help me to do this

// you can either set them hard code like this or have them out of a data base into a variable

$name = "partha";
$live = "durgapur";


echo "my name is ".$name."i live in ".$live;



// also this to break it when it gets to the server

$break = explode(" ", $string);

$newstring = $break[0]." ".$break[1]." ".$break[2]." ".$name." ".$break[4]." ".$break[5]." ".$break[6]." ".$live;

some where in your code you would set those to variables and then just print them

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.