4
Everything in my code appears to be correct however the error: "Call to Undefined Function split()" is presented to me on the screen when running my script so I saw the error is on line 31 how can I fix it ?
if(isset($_POST['lista']) && $_POST['delimitador'])
{
separar(trim($_POST['lista']), $_POST['delimitador']);
}
function separar($lista, $delimitador){
$ab = split("\n", $lista); //está é a linha 31 aonde o erro e apresentado
$cb = count($ab);
for($x = 0; $x < $cb; $x++){
list($card, $mes, $ano, $cvv) = split("\\".$delimitador, $ab[$x]);
testar($card, $mes, $ano, $cvv);
flush();
ob_flush();
}
}
function getStr($string,$start,$end){
$str = explode($start,$string);
$str = explode($end,$str[1]);
return $str[0];
}
try to give an escape character do so n
– Anderson Henrique
Change split to str_split. According to the split documentation: This function is OBSOLETE in PHP 5.3.0 and has been REMOVED in PHP 7.0.0. Alternatives to this function include: preg_split(), explode(), str_split()
– Bruno Rigolon
ha yes, thanks for the friendly info I will try.
– Bruno Lazarine