0
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 Telephone = 222-2222
echo Telefone: 2222-2222
- If on the contrary
echo Celular: 9999-99999
- If both are not empty it will be
echo Telefone: 2222-2222 e Celular: 9999-9999
I couldn’t ride.
<?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;
}
}
?>
It was very good thank you
– Edivaldo Macedo
You are welcome. Just choose one of the answers and mark , you can also vote on the answers you found useful. Abs!
– Sam