You are here: Re: [PHP] $pieces = explode(",", $_POST["fieldtype1"]); « PHP « IT news, forums, messages
Re: [PHP] $pieces = explode(",", $_POST["fieldtype1"]);

Posted by Curt Zirzow on 10/19/40 11:31

On Tue, Nov 08, 2005 at 12:00:06AM -0500, John Taylor-Johnston wrote:
> Hi,
> $pieces = explode(",", $_POST["fieldtype1"]);
>
> What is a way to echo each pieces[x] separately so I can echo them like
> this:
>
> while(x=0 to xMax)
> {
> $sql .= "`".$pieces[x]."` \r\n";
> }

Well, explode() returns an array so you are looking for how to loop
through the array of $pieces, so something like:

foreach($pieces as $piece)
{
$sql .= "`$piece`\r\n";
}

Curt.
--

 

Navigation:

[Reply to this 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

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