jeudi 13 août 2020

allocating a string based on PHP if statement

I quite new to PHP this seems to be causing me problems:

<?php

$ppe1="Water";

echo $ppe1; 

if ($ppe1="Tap") {
    
    $dog="time";
    
}
else

{$dog="travel";}

echo $dog; 

?>

I am obviously being bery stupid but I cannot seem to allocate the $dog string based on the if statement

Aucun commentaire:

Enregistrer un commentaire