Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Scoprire se il valore è un double

    Ciao ragazzi, ho un problema che pensavo fosse banale ma mi pare non lo sia...

    Ho una semplice variabile che non so cosa contiene. Come faccio a sapere se contiene un numero? Magari anche distinguere tra double e integer.

    Non esiste una funzione tipo: isDouble() o isInteger()?

    Greazie!

  2. #2
    Per sapere se è un valore numerico
    http://it.php.net/is_numeric

    Per distinguere se double o int, puoi usare:
    http://it.php.net/is_double
    http://it.php.net/is_int

  3. #3
    perbacco se ci sono....

    http://it2.php.net/manual/en/function.is-int.php

    codice:
    See Also
    
        * is_bool() - Finds out whether a variable is a boolean
        * is_float() - Finds whether the type of a variable is float
        * is_numeric() - Finds whether a variable is a number or a numeric string
        * is_string() - Find whether the type of a variable is string
        * is_array() - Finds whether a variable is an array
        * is_object() - Finds whether a variable is an object

    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  4. #4
    grazie, scusami per la domanda stupida... è che io cercavo in Mathematical Functions...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.