[snip]
while (!$recordSet->EOF) {
$arrX = $recordSet->fields['user_id'] =>
$recordSet->fields['field_value'];
$recordSet->MoveNext();
[/snip]
while (!$recordSet->EOF) {
$arrX[$recordSet->fields['user_id']] =
$recordSet->fields['field_value'];
$recordSet->MoveNext();
}
--
PHP General Mailing List
Hello Jochem,
I tried what you suggested and it work just perfect as long as i made
the array by hand. But when I try to generate the array using the
database I can not get it to work. How would I create the array $arrX
from the mysql database.
I have tried this but it does not work properly
while
// given an array in the form:
$arrX = array(
'6' => 'English||Spanish'
'8' => 'English||Portuguese||Finnish'
// ...etc...
);
// define a new array & loop thru $arrX like so:
$arrTmp = array()
foreach ($arrX as $langs) {
$arrTmp = array_merge($arrTmp, explode('||',
I am pulling data from a database that list the Language a person
speaks and the id number. It is in a format like this.
user_idfield_value
6English||Spanish
2English
8English||Portuguese||Finnish
5English||Japanese||German
3
On Sun, 2004-02-01 at 21:26, Richard Kurth wrote:
> each time it looks at a new record it list all the languages that that
> person speaks with a double pipe in between each language.
>
> What I need to do is find all the unique languages so I can generate a
> list of languages that do not have an
; Sent: Sunday, February 01, 2004 9:27 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Pulling unique data from database
>
>
> I am pulling data from a database that list the Language a person
> speaks. It is in a format like this.
>
> English||Spanish
> English
>
Hello Richard,
Normally the distinct calause in sql serves this purpose but it seems
that the way your DB is designed you cannot make use of it. The bad news
is that you might have to read all the rows split them by the pipe
symbol and insert them into a list manually. ouch!
Richard Kurth w
On Monday 02 February 2004 10:26, Richard Kurth wrote:
> What I need to do is find all the unique languages so I can generate a
> list of languages that do not have any repeats in it. so the list above
> would be English,Portuguese,Finnish,Japanese,German,Spanish in any
> order
explode() and arr
I am pulling data from a database that list the Language a person
speaks. It is in a format like this.
English||Spanish
English
English||Portuguese||Finnish
English||Japanese||German
English
English
German
each time it looks at a new record it list all the languages that that
person speaks with
9 matches
Mail list logo