Reply to Re: Replace a character in a string variable

Your name:

Reply:


Posted by ED on 06/30/06 15:15

"Syl" <david.hunter@gmail.com> wrote in message
news:1151680198.937686.178460@p79g2000cwp.googlegroups.com...
>
> ED wrote:
>> "Syl" <david.hunter@gmail.com> wrote in message
>> news:1151679331.062036.128540@x69g2000cwx.googlegroups.com...
>> > Hi group -
>> >
>> > I have a variable which is created from an input form.
>> > After concatenating the input I want, I end up with a variable named
>> > $all which looks like this :
>> > delegatecountry,delegatefname,delegatelname,delegatebname
>> >
>> > I want to take this string and replace all the commas with this :
>> > </th><th>
>> >
>> > So - I tried this :
>> >
>> > $inside="</th><th>";
>> > $newall = str_replace($inside, ",", $all);
>> >
>> >
>> > But - it doesn't work.
>> > http://ca3.php.net/str_replace
>> >
>> > What am I doing wrong ?
>> >
>>
>> First 2 parameters the wrong way round, should be:
>>
>> $newall = str_replace(',', $inside, $all);
>>
>> cheers
>> ED
>
> DOH!
>
> Thanks very much ED for the quick reply!
>

:) no prob!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация