I have an array like below which is generated by exploding a user-supplied string:
Код: Выделить всё
// $array = explode(',' $_POST['arrCheckTrans']);
$array = [
'098A',
'mike',
'Street17',
'LA',
'07AA',
'steve',
'Street14',
'LA'
];
Below is my code:
Код: Выделить всё
if ($_POST['action'] == "checktransfertmp") {
$arrCheckTrans = $_POST['arrCheckTrans'];
$trans = explode(",", $arrCheckTrans);
$length = count($trans);
for ($i = 0; $i < $length; $i++) {
print $trans[$i];
}
}
Источник: https://stackoverflow.com/questions/209 ... -divisible