[Solved] Combine Multiple rows from mysql array


You need to use a other array.

<?php
$lender = mysql_query("Select * from lender where reference="$reference"");
$formated_lender = array();
while ($lenderrow=mysql_fetch_array($lender)) {

  $formated_lender = $lenderrow["lender"] . " " . $lenderrow["lenderref"] . " " . "£" .            
  $lenderrow["amount"];
}

foreach ($formated_lender as $row)
{
  echo $row . '<br />';
}

Or, if you would just one variable containing all the row, replace $lende1 = ... by $lender1 .= ...

1

solved Combine Multiple rows from mysql array