Jump to content

[SOLVED] count(Problem)


phpretard

Recommended Posts

I am trying to count the number of emails in the array and display a number.

 

$Match should = 3

 

$Match is only correct in the first table.  The second and third adds 3 to each

 

 


/******* THIS IS THE ARRAY I AM TRYING TO COUNT*******/

Array
(
    [0] => [email protected]
    [1] => [email protected]
    [2] => [email protected]
)

/******* $APPEmail[]=THE ARRAY ABOVE*******/


$result = mysql_query("SELECT * FROM table1 WHERE confirmed2='0' ");
while($row = mysql_fetch_array($result))
{



$resultSearchAP = mysql_query("SELECT * FROM table2 WHERE 

APZIPList LIKE '%$PropertyZip%' 

AND

$L1='checked'

");

while($row = mysql_fetch_array($resultSearchAP))
  {
  $PoolID=$row['PoolID'];
  $APPEmail[]=$row['APEmail'];
  
  $Match=count($APPEmail);
  } 

echo "
<table border=0 width='500'>
<form action='' method=post>
<tr>
	<td width='130'>Order Number:</td>
	<td>$ASORDERNUMBER</td>
</tr>
<tr>
	<td width='130'>Lender Name:</td>
	<td>$SendersFirstName $SendersLastName</td>
</tr>
<tr>
	<td width='130'>Lender Phone:</td>
	<td>$lenderPhone</td>
</tr>
<tr>
	<td width='130'>Lender Email:</td>
	<td>$CLEmail</td>
</tr>
<tr>
	<td width='130'>Property Zip:</td>
	<td>$PropertyZip</td>
</tr>
<tr>
	<td width='130'>Appraiser Match:</td>
	<td>$Match</td>
</tr>		
<tr>
	<td width='130'><input type='hidden' name=ASORDERNUMBER value='$ASORDERNUMBER'</td>
	<td><input type=submit name='ApproveOrder' value='Confirm And Send'></td>
</tr>
</form>	
</table>
<br><br>
";

} // END SEARCHAP WHILE

} // END RESULT WHILE

 

 

Thank you for looking.

Link to comment
https://forums.phpfreaks.com/topic/135250-solved-countproblem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.