This script:
<?php
$str = 'a,A:b,B';
$arr = explode( ':', $str );
echo '<pre>';
print_r( $arr );
echo '</pre>';
foreach( $arr as $item ){
list( $lower, $upper ) = explode( ',', $item );
echo $lower . ', ' . $upper . '<br>';
}
?>
Has a simple expected behavior of outputting the following:
Array
(
[0] => a,A
[1] => b,B
)
a, A
b, B
However, we've run into a system where it outputs as follows:
Array
(
[0] => a,A
[1] => b,B
)
Array,
Array,
Whilst I cannot explain it, I'm hoping that a member here can - I look forward to any suggestions! Baffled.
Alex