I'm really getting stuck with this, I've tried so many different ways and I am unable to get what I need in order to make this work. Please, can you show me what's wrong in order for me to get this working.
In trying to build a property website a file (.blm) is uploaded, I am in need of getting the AGENT_REF from this file into an array so I can compare against the database and show the array difference... The .blm file contains information AGENT_REF^ADDRESS_1^ADDRESS_2^POSTCODE1^POSTCODE2...
I am convinced that it's the AGENT REF that's not working correctly in order to get the results I need.
Please help me solve this.
<?php
$rmdata = $rmparser->getPropertyData();
$properties = array();
foreach ($rmdata as $properties) {
$fields = array();
$values = array();
$blmarArray = array();
foreach ($properties as $field=>$value) {
if (!$value) continue;
$blmarArray = $values[0];
$agentref = $values[0];
$fields[] = $field;
$values[] = "'".$value."'";
}
$sql_archeck = mysql_query("SELECT `AGENT_REF` FROM `eprentals`");
$sqlarArray = array();
while($row = mysql_fetch_array($sql_archeck)) {
$sqlarArray[] = $row['AGENT_REF'];
}
$combyArrayDiff = array_diff($sqlarArray, $blmarArray);
echo '
<div style="background-color:#ffd7d7;border:#bcbcbc solid 1px;padding:6px;margin- bottom:6px;">
<span style="padding:2px;"><p><b>SQL list:</b> ' . implode(', ', $sqlarArray) . '</p></span>
<p><b>Uploaded list:</b> ' . implode(', ', $blmarArray) . '</p>
<p><b>Diff list:</b> ' . implode(', ', $combyArrayDiff ) . '</p>
</div>
';
}
I Greatly appreciate any assistance from this, it's really got me baffled. Thank you so much for your time.
$rmdatalook like, mind adding a var_dump($rmdata) or var_export($rmdata) of that value