Hi there!
I perfom a simple query for retrieving phone numbers:
$query = mysql_query( "SELECT * FROM $table WHERE phone='$sphone') or die ( "select error " . mysql_error() );
if ( mysql_num_rows( $query ) > 0 )
while ( $row = mysql_fetch_array( $query ) ) {
$mystring .= "<font color='#000099'>".$row ["lastName" ]." "."</font>"."<font color='#663399'>".$row ["firstName" ]."</font>".", "."<font color='#0033CC'>".$row ["school" ]." - ".$row ["year" ]."</font>"."<br />";
}
print $mystring;
(I send $mystring to a .swf file where it is parsed, but this has no importance for solving my problem...)
When only one number is found: no problem
But if there's duplicates, it becomes more complicated (for me!) to handle...
How can I get all the results (in an array or each designated by a new string ?) so I can choose, later in the script, which one to display (formatted as shown in the code) depending on some conditional logics?
Many thanks in advance!
Regards.
Gerard