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,

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, it

Re: [PHP] array issues

2007-02-26 Thread Matt Carlson
If i'm understanding you correctly, you have something like a flat file, and hopefully it is artist[tab]artist[tab] with the title being something like artist1title[tab]artist2title[tab], etc. If so, use explode. $artists = explode("\t", $stringofartists); $songs = explode("\t", $stringoftitles

[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 array

Re: [PHP] array issues

2001-08-09 Thread Richard Baskett
try html code php code $values = "'','$interviewed','$interviewer'," for ($i=0; $i<10; $i++) { $qtemp .= "'".q[$i]."',"; $atemp .= "'".a[$i]."',"; } $fields = "id,interviewed,interviewer,q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,a1,a2,a3,a4,a5,a6 ,a7,a8,a9,a10,interview_date"; $query = "INSERT INTO

[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 etc... each going to their own spot in the table. with this $query = "insert into interviews(id,interviewed,interviewer,q1,a1,q2,a2,q