1
{
    name: 'Registros preliminares',
    data: [<?php $numeros = array("1","2","3","4","5","6","7","8","9","0");
    if (($handle = fopen('datos.csv', 'r')) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {
    if ($data[3] == '' OR $data[3][0] != DISTINTO A CUALQUIER VALOR DE $NUMEROS){
        $data[3] = 'null';}
    print_r($data[3].",");
}
fclose($handle);}?>]
}

1 respuesta 1

1

Puedes lograrlo con in_array así:

{
  name: 'Registros preliminares',
  data: [<?php $numeros = array("1","2","3","4","5","6","7","8","9","0");
        if (($handle = fopen('datos.csv', 'r')) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {
        if ($data[3] == '' OR !in_array($data[3][0], $numeros))         {
            $data[3] = 'null';}
            print_r($data[3].",");
        }
    fclose($handle);}?>]
}
1

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.