Hi all

I have a problem that is probably just a lack of php
syntax knowledge on my part and hopefully someone can
help me out.

I have an array and i want to query a database for
each value in that array. I then want to store that
result as a new variable called $array[value]total. 

see code below

$array=array("Flyer","Email","Phone");
$array_len=count($array);
for($i=0;$i<$array_len;$i++){
      $query="select count(score) from test_table
where source = '$array[$i]'";
      $result=mssql_query($query,$numero);
      $row=mssql_fetch_row($result);
      $array[$i].total=$row[0];<-- problem here
}


so for the above code i would like to create three
variable $flyertotal,$emailtotal & $phonetotal and
have the result of the count(score) query stored in
them. Any help or pointing to documentation would be
greatly appreciated!

Cheers

Bob

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to