I'm trying to make a condition in php this way:
$Telefone = "";
$Celular = "";
Where:
- If both empty shows
echo sem Telefone e nem Celular
- If variable Phone = 222-2222% with%
- If instead
echo Telefone: 2222-2222
- If both are not empty it will be
echo Celular: 9999-99999
I could not mount.
<?php
$Telefone= "Telefone";
$Celular= "";
if (empty($Telefome) and empty($Celular)) {
echo "Tel=Vazio e Cel=Vazio";
}
else
{
if (empty($Telefome) and empty($Celular)) {
echo "so". " " . $Telefone;
}
else
{
echo $Celular. "e". $Telefone;
}
}
?>