Réponse acceptée !
Salut!
En PHP, il n'y pas des types aussi... typés, lol, qu'en d'autres languages...
Une fois la variable récupérée, tu peux tout de suite faire des calculs...
Autrement, si tu veux tester si il s'agit s'une entier:
if( is_numeric( $variable ) )
echo 'entier';
else
echo 'pas entier';
Idem avec: is_float pour un nombre à virgule flottante...
Autrement, pour changer le type ( dans le cas ou la chaine contiendrait aussi des caractères alphanumériques), tu as le Transtypage:
http://www.nexen.net/docs/php/annotee/language.types.typecasting.php?lien=int
Autrement:
http://www.nexen.net/docs/php/annotee/function.intval.php
http://www.nexen.net/docs/php/annotee/function.settype.php
http://www.nexen.net/docs/php/annotee/function.floatval.php
Voila, j'éspère t'avoir aidé un tit peu
@++
R@f
www.allpotes.ch: Photos, humour, vidéos, gags, ...
"On dit que seulement 10 personnes au monde comprenaient Einstein. Personne ne me comprends. Suis-je un génie???"