Page 1 of 1

Remove some words from a string....

Posted: Sat Jun 06, 2009 12:55 pm
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"

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

Posted: Sat Jun 06, 2009 1:13 pm
by quick5pnt0
I think you need to look at the function substr_replace.

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

Posted: Sat Jun 06, 2009 3:48 pm
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