Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:25:22+00:00 2026-06-08T08:25:22+00:00

I’m really getting stuck with this, I’ve tried so many different ways and I

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:25:23+00:00Added an answer on June 8, 2026 at 8:25 am

    I guess this is what you want to do:

    /* create 2 empty arrays */
    $rm_agentrefs = array();
    $db_agentrefs = array();
    
    /* fetch rmdata */
    $rmdata = $rmparser->getPropertyData();
    
    /* foreach rmdata */
    foreach($rmdata as $current_row)
    {
        /* store the Agent Ref in the rm-array */
        $rm_agentrefs[] = $current_row['AGENT_REF'];
    }
    
    
    /* define a database query for fetching agent ref from database */
    $db_query = "SELECT `AGENT_REF` FROM `eprentals`";
    
    /* run the database query */
    $db_resource = mysql_query($db_query); 
    
    /* fetch each line from the resource */
    while($current_row = mysql_fetch_array($db_resource))
    {
        /* store each agent ref in the db-array */
        $db_agentrefs[] = $current_row['AGENT_REF']; 
    }
    
    /* compare db and rm arrays (missing = db - rm) */
    $missing_agentrefs = array_diff($db_agentrefs, $rm_agentrefs);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.