how to compare a variable with regular expressions in php?

1

I need to compare a variable using php, I pass my code so you understand me better

$palabra ="hola=Adv&%ASa";

if($palabra == "hola="){

    echo "bien"; 

}else{

    echo "mal";
}

What I need is that I recognize any character that comes after the avocado Hello = and throw me the message of good, I think it should be with regular expressions but I do not know how to apply them in php. thanks

    
asked by ingswsm 30.01.2018 в 23:32
source

0 answers