Array strangeness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Code is simple enough in long hand ...

$surname = array();
$name = $row['n_surn'];
$cnt = $row['sn_count'];
print_r($row);
print($name);
print($cnt);
$surnames[$name]['name'] = $name;
$surnames[$name]['match'] = $cnt;

Result ...
Array ( [n_surn] => CORTEEN [sn_count] => 227 )
CORTEEN
227
Array ( [CORTEEN] =>
    Array ( [name] => CORTEEN
            [match] => Array ( [name] => CORTEEN [match] => 227 ) ) )

WHY is the [match] an array rather than the 227 value from the original
result array.
Actual code was not expanded using the intermediate variables, but the
problem is that incorrect value in the match field :(

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux