[thelist] need guidance on arrays and loops in PHP

Brady Mitchell mydarb at gmail.com
Thu Mar 27 21:41:10 CDT 2008

On Mar 27, 2008, at 147PM, Jeremy Weiss wrote:
> So if all the properties (assuming there is more than one) were listed
> by the same agent, then I forward the contact information to that
> agent. If they're listed by different agents, then it goes into  a
> general queue for manual assignment.

What about something like this?

// These are the properties that the user selected
$properties = array('mls1','mls2','mls3','mls4');

// User info is whatever the user submitted that the agent needs
$user_info = 'Joe Schmoe, (555)555-1212';

// We need to know who is responsible for each property
// lookup_agent accepts mls_id and returns agent_id
foreach($properties as $mls_id)
	// Lookup agent id
	$agent_id = lookup_agent($mls_id)

	// Map the agent_id and $mls_id and $user_info together
	// this will be used to do the assignments

Is there a reason you want to have some assigned manually?


More information about the thelist mailing list