Remove some words from a string....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sultanos
Forum Newbie
Posts: 2
Joined: Sat Jun 06, 2009 12:47 pm

Remove some words from a string....

Post by sultanos »

Hy guys what i am willing to do is to check a string a long string i want to remove just a part of the string

Code: Select all

<form name="currencies" action="http://www.bebovino.com/login.php" method="get"><img src="images/cambio.png" width="28" height="20" style="border-width:0px;border-collapse:collapse;" alt="moneda / currency / W&auml;hrungen" title="moneda / currency / W&auml;hrungen"><select name="currency" onChange="this.form.submit();" style="width:55px;"><option EUR" SELECTED>Euro</option><option value="USD">Dollar</option><option value="PTS">Pesetas</option><option value="GBP">Pound Sterling</option></select><input type="hidden" name="language" [color=#BF0000]value="en">[/color]
What i want is to change the content of the value in red , what is within the comas "en" the en this code is sent by a variable i want to catch it ,change that value and send it again, and yes, i only need to chage the last value="xx"
Last edited by Benjamin on Sat Jun 06, 2009 1:27 pm, edited 1 time in total.
Reason: Changed code type from text to html.
quick5pnt0
Forum Newbie
Posts: 3
Joined: Fri Jun 05, 2009 12:43 pm

Re: Remove some words from a string....

Post by quick5pnt0 »

I think you need to look at the function substr_replace.
sultanos
Forum Newbie
Posts: 2
Joined: Sat Jun 06, 2009 12:47 pm

Re: Remove some words from a string....

Post by sultanos »

i would if i only had one value but the string has at least 4 diferent values. what i need is to extract the last value in this case en and sent it to a variable change it and replace it back
Post Reply