Skip to main content
2 de 3
se añadieron 41 caracteres en el cuerpo
information
  • 6.5k
  • 3
  • 25
  • 43

Puedes lograrlo con in_array asi:

{
  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);}?>]
}
alanfcm
  • 20.9k
  • 11
  • 19
  • 35