You are here: Re: Array Processing « PHP Programming Language « IT news, forums, messages
Re: Array Processing

Posted by Janwillem Borleffs on 09/26/81 11:41

J Huntley Palmer wrote:
> How may I concatenate the index respective questions and answers into
> one string per index using ONE foreach loop? I do not want to use
> numerical indexes just the named ones as below.
>
> In other words, in one foreach loop, if possible, I want to have the
> results as question0+answer0 and question1+answer1 in 2 separate
> strings entered into an array.
>

How do you want to establish the relationship between the questions and
answers? With your example array, only the following would make sence:

$results = array(
$array['QUEST'][0] . $array['ANSWER'][0],
$array['QUEST'][1] . $array['ANSWER'][1]
);


JW

 

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

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