@ 2015-04-21T14:21:53Z <?php
$data = "Apr 21 08:45 AM,RediMed Northeast,15,2015-04-21 08:00:00.000,2015-04-21 08:04:00.000,2015-04-21 08:17:00.000,2015-04-21 08:17:00.000,90 minutes
Apr 21 08:45 AM,RediMed North,14,2015-04-21 08:00:00.000,2015-04-21 08:22:00.000,2015-04-21 08:27:00.000,2015-04-21 00:00:00.000,90 minutes
Apr 21 09:00 AM,RediMed Northeast,15,2015-04-21 08:00:00.000,2015-04-21 08:04:00.000,2015-04-21 08:17:00.000,2015-04-21 08:17:00.000,90 minutes
Apr 21 09:00 AM,RediMed North,14,2015-04-21 08:00:00.000,2015-04-21 08:13:00.000,2015-04-21 08:17:00.000,2015-04-21 08:25:00.000,90 minutes";
$data = explode("\n", $data);
$csv = array_map('str_getcsv', $data);
foreach ($csv as $v) {
print_r($v);
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 5.3.0 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.38 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.25 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.4 , 8.3.6 Array
(
[0] => Apr 21 08:45 AM
[1] => RediMed Northeast
[2] => 15
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:04:00.000
[5] => 2015-04-21 08:17:00.000
[6] => 2015-04-21 08:17:00.000
[7] => 90 minutes
)
Array
(
[0] => Apr 21 08:45 AM
[1] => RediMed North
[2] => 14
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:22:00.000
[5] => 2015-04-21 08:27:00.000
[6] => 2015-04-21 00:00:00.000
[7] => 90 minutes
)
Array
(
[0] => Apr 21 09:00 AM
[1] => RediMed Northeast
[2] => 15
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:04:00.000
[5] => 2015-04-21 08:17:00.000
[6] => 2015-04-21 08:17:00.000
[7] => 90 minutes
)
Array
(
[0] => Apr 21 09:00 AM
[1] => RediMed North
[2] => 14
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:13:00.000
[5] => 2015-04-21 08:17:00.000
[6] => 2015-04-21 08:25:00.000
[7] => 90 minutes
)
Output for 8.3.5 Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Array
(
[0] => Apr 21 08:45 AM
[1] => RediMed Northeast
[2] => 15
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:04:00.000
[5] => 2015-04-21 08:17:00.000
[6] => 2015-04-21 08:17:00.000
[7] => 90 minutes
)
Array
(
[0] => Apr 21 08:45 AM
[1] => RediMed North
[2] => 14
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:22:00.000
[5] => 2015-04-21 08:27:00.000
[6] => 2015-04-21 00:00:00.000
[7] => 90 minutes
)
Array
(
[0] => Apr 21 09:00 AM
[1] => RediMed Northeast
[2] => 15
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:04:00.000
[5] => 2015-04-21 08:17:00.000
[6] => 2015-04-21 08:17:00.000
[7] => 90 minutes
)
Array
(
[0] => Apr 21 09:00 AM
[1] => RediMed North
[2] => 14
[3] => 2015-04-21 08:00:00.000
[4] => 2015-04-21 08:13:00.000
[5] => 2015-04-21 08:17:00.000
[6] => 2015-04-21 08:25:00.000
[7] => 90 minutes
)
Output for 4.3.2 - 4.3.10 , 4.4.0 - 4.4.9 , 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 Warning: array_map(): The first argument, 'str_getcsv', should be either NULL or a valid callback in /in/97f3h on line 10
Warning: Invalid argument supplied for foreach() in /in/97f3h on line 12
Output for 4.3.11 Warning: array_map(): The first argument, 'str_getcsv', should be either NULL or a valid callback in /in/97f3h on line 10
Output for 4.3.0 - 4.3.1 Warning: array_map() [http://www.php.net/function.array-map]: The first argument, 'str_getcsv', should be either NULL or a valid callback in /in/97f3h on line 10
Warning: Invalid argument supplied for foreach() in /in/97f3h on line 12
preferences:dark mode live preview
336.02 ms | 401 KiB | 423 Q