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] => randal@email.com
    [1] => membership@email2.com
    [2] => support@email3.com
)

/******* $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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.