$query1=mysql_query("select * from table1");
$query2=mysql_query("select * from table2");
while($query1_row=mysql_fetch_assoc($query1))
{
while($query2_row=mysql_fetch_assoc($query2))
{
echo $query1_row['fname'].$query2_row['fname']."<br>";
}
}
I have created two table with fname as a field in both the table.I wanted to concatenate every fname in table1 with every other fname in table 2.