Una variable es el nombre que se da a un espacion en memoria para representar un valor de un dato, por ejemplo, cuando tenemos la suma de dos numeros, podriamos tener un caso asi:
8 + 10 =18
en todo caso tendriamos tres variables:
variable1=8
variable2=10
variable3=18
Las variables no solo sirven para almacenar este tipo de datos en memoria ademas se pueden agregar variables de tipo cadena,flotantes y decimal.
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Tipos de variables de codigo en Php 7 desarrollado por Rafael Santiago Cruz
contactame al telefono 8129704095">
<link rel="stylesheet" href="/css/estilos.css" type="text/css" media="all" />
<title>Rafael Santiago Cruz | Codigo de aplicaciones | Variables Php 7</title>
</head>
<body>
<h1>Rafael Santiago Cruz</h1>
<h2>#Codigodeaplicaciones.xyz</h2>
<h3>Variavles en PHP 7</h3>
<!--Aqui van las variables-->
<?php
#Variable tipo cadena
$nombre='Rafael';
#variable tipo númerico
$numero=20;
#variable tipo decimal
$numeroDecimal=10.5;
#variable tipo boleano
$boleano=true;
#' '.$numero.
echo '<p>'.$nombre.' '.$numero.' '.$numeroDecimal.' '.$boleano.'</p>';
echo '<h3>'.$nombre.' '.gettype($nombre).'</h3>';
echo '<h3>'.$numero.' '.gettype($numero).'</h3>';
echo '<h3>'.$numeroDecimal.' '.gettype($numeroDecimal).'</h3>';
echo '<h3>'.$boleano.' '.gettype($boleano).'</h3>';
?>
<footer>
<?php
echo '<p><a href="/">Regresar al inicio</a></p>';
?>
</footer>
</body>
</html>