Re: [PHP] array issues

2007-02-27 Thread Richard Lynch
Just add another array for each with $artist as the key. while ($artist, $vote, $email) = mysql_fetch_row($results)){ $votes[$artist] = $vote; $emails[$artist] = $email; } Although, actually, there is probably some better ways to do what you are doing, but with only the query to look at,

Re: [PHP] array issues

2007-02-27 Thread Jim Lucas
Richard Lynch wrote: Just add another array for each with $artist as the key. while ($artist, $vote, $email) = mysql_fetch_row($results)){ I think you ment while ( list($artist, $vote, $email) = mysql_fetch_row($results) ){ $votes[$artist] = $vote; $emails[$artist] = $email; } Although,

[PHP] array issues

2007-02-26 Thread Steven Macintyre
Hi all, I am working on a project for someone and with the brief I received before - I created a record per action with the following information; Artist[tab]artist[tab]artist[tab] etc as a entry for artists Then I have the same for titles etc ... What I have been doing is creating the

[PHP] array issues

2001-08-09 Thread Jerry Lake
I believe that there is a better way to do what I am trying to do here. I have an online form to enter interviews into a MySQL db right now it is like this input type=text name=q1 size=100 input type=text name=a1 size=100 input type=text name=q2 size=100 input type=text name=a2 size=100

Re: [PHP] array issues

2001-08-09 Thread Richard Baskett
try html code input type=text name=q[] size=100 input type=text name=a[] size=100 php code $values = '','$interviewed','$interviewer', for ($i=0; $i10; $i++) { $qtemp .= '.q[$i].',; $atemp .= '.a[$i].',; } $fields =