I am having problem finding the last record from an array in cakephp. Please suggest me a proper way to find out the last entry from the array.
Asked
Active
Viewed 306 times
-3
-
possible duplicate of [get last value in array](http://stackoverflow.com/questions/3801891/get-last-value-in-array) – ndm Aug 04 '14 at 15:30
-
'PassportDetail' => array( (int) 0 => array( 'id' => '3', 'iso_countrylist_id' => '154', 'passport_number' => 'gdfgdfsgfdg', 'issue_date' => '2014-07-25', 'expiry_date' => '2014-07-25', 'basic_info_id' => '12', 'IsoCountrylist' => array( 'title' => 'NEPAL' ) ), (int) 1 => array( 'id' => '4', 'iso_countrylist_id' => '1', 'passport_number' => '11111111111', 'issue_date' => '2014-08-02', 'expiry_date' => '2014-08-02', 'basic_info_id' => '12', 'IsoCountrylist' => array( 'title' => 'AFGHANISTAN' ) ) ), I need to echo afghanistan – Tikaram Bhandari Aug 04 '14 at 15:39