Hello,
I am a dove flying through blue skies peacefully soaking up the beautifull scenery... yeah right! I am in a nightmare of hopeless and futile fortitude :bemused: . Can anyone help please?
I need to compare two different fields, one field (A) has the list of pre set keys, whilst the other is a list that is made up when the keys have values assigned to them (😎.
So, when the script calls the database and then runs the check to see if a key in A is the same as a key in B, the page should echo B with a number showing how many values are in there, otherwise it will show A. Summarilly, the list displayed will be mostly A if there aren't many values inputted into the system.
$array1 = explode("||", $field_elements);
while (list($countryC, $list_item) = each ($array1));
$country=$OneCountry['name'];
$num=$OneCountry['num'];
$array2 = array($a);
while(list(,$OneCountry)=each($a));
$result = array_merge($array1, $array2);
print_r($result);
foreach($result as $country)
{
echo "$country ($num)<br>";
}
else
{
echo "$country <br>";
This is my code so far, and does not work properly, I can get a list of all the values, but I want the two fields to merge in the correct order.
Thanks