MDLarson
Registered
I'm just tweaking my PHP script now, and would like to detect whether a variable ($lodging_plan) includes the word "Delights". $lodging_plan is a radio button in this web form.
I'm trying to figure out if PHP has any text handling functions. Basically, if $lodging_plan includes the word "Delights", then do A, otherwise do B.
The code below uses the equals (=) sign. I'm sure double-equals (==) is not what I want, but I'm not sure what the difference is, and what else I should use...
I'm trying to figure out if PHP has any text handling functions. Basically, if $lodging_plan includes the word "Delights", then do A, otherwise do B.
The code below uses the equals (=) sign. I'm sure double-equals (==) is not what I want, but I'm not sure what the difference is, and what else I should use...
Code:
if ( $lodging_plan = "Delights") {
echo "This is a Doggy Delights plan" ;
exit ;
} else {
echo "This is not a Doggy Delights plan" ;
exit ;
}