0

I have inherited this lovely code and I have found the following in the database. Can someone tell me what kind of array this is so that I can pull out the information? I am using Codeigniter PHP Framework: -

a:70:{i:0;s:19:"Antigua and Barbuda";i:1;s:9:"Australia";i:2;s:7:"Austria";i:3;s:7:"Bahamas";i:4;s:7:"Bahrain";i:5;s:8:"Barbados";i:6;s:7:"Belgium";i:7;s:6:"Brunei";i:8;s:6:"Canada";i:9;s:4:"Cuba";i:10;s:6:"Cyprus";i:11;s:14:"Czech Republic";i:12;s:7:"Denmark";i:13;s:18:"Dominican Republic";i:14;s:5:"Egypt";i:15;s:7:"Estonia";i:16;s:4:"Fiji";i:17;s:7:"Finland";i:18;s:6:"France";i:19;s:7:"Germany";i:20;s:7:"Grenada";i:21;s:7:"Iceland";i:22;s:7:"Ireland";i:23;s:6:"Israel";i:24;s:5:"Italy";i:25;s:7:"Jamaica";i:26;s:5:"Japan";i:27;s:6:"Jordan";i:28;s:8:"Kiribati";i:29;s:12:"Korea, South";i:30;s:6:"Kuwait";i:31;s:13:"Liechtenstein";i:32;s:10:"Luxembourg";i:33;s:8:"Malaysia";i:34;s:8:"Maldives";i:35;s:5:"Malta";i:36;s:16:"Marshall Islands";i:37;s:10:"Micronesia";i:38;s:6:"Monaco";i:39;s:7:"Morocco";i:40;s:5:"Nauru";i:41;s:11:"Netherlands";i:42;s:11:"New Zealand";i:43;s:6:"Norway";i:44;s:4:"Oman";i:45;s:5:"Palau";i:46;s:16:"Papua New Guinea";i:47;s:8:"Portugal";i:48;s:5:"Qatar";i:49;s:18:"Russian Federation";i:50;s:21:"Saint Kitts and Nevis";i:51;s:11:"Saint Lucia";i:52;s:32:"Saint Vincent and the Grenadines";i:53;s:5:"Samoa";i:54;s:10:"San Marino";i:55;s:12:"Saudi Arabia";i:56;s:9:"Singapore";i:57;s:15:"Solomon Islands";i:58;s:5:"Spain";i:59;s:6:"Sweden";i:60;s:11:"Switzerland";i:61;s:8:"Thailand";i:62;s:5:"Tonga";i:63;s:19:"Trinidad and Tobago";i:64;s:6:"Turkey";i:65;s:6:"Tuvalu";i:66;s:20:"United Arab Emirates";i:67;s:13:"United States";i:68;s:7:"Vanuatu";i:69;s:5:"Yemen";}"
1
  • 1
    may be json encoded array Commented Sep 8, 2015 at 16:34

1 Answer 1

1

This is what's returned when you use PHP's serialize() function.

Use unserialize() to turn that back into an array.

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect answer! I've been looking at it for so long I didn't even think of that. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.