Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

obtener tipo

<?php

$a = $b = "3.1416"; // asignamos a las dos variables la misma cadena de texto

settype($b, "float"); // y cambiamos $b a tipo float

print "$a vale $a y es de tipo ".gettype($a);

print "<br />";

print "$b vale $b y es de tipo ".gettype($b);

?> 
Source by educacionadistancia.juntadeandalucia.es #
 
PREVIOUS NEXT
Tagged: #obtener #tipo
ADD COMMENT
Topic
Name
9+2 =