Jump to content

[SOLVED] call me dumb but can someone please help me out with this


kannu

Recommended Posts

hello,

after you read the question you would realize i am a true newbie in php, but what can i do now. i have to start somewhere.

 

my questions is that i am trying to create a simple "if then else" statement where i am trying to see if a string contains a set of letters. but i cannot find any function which can let me search if a string has those letters and continue in the if else statement.

for example :-

 

$wert = "catid52product34show"

 

 

if($wert == "product34")

{ do this }

else if($wert == "product35")

{ do that}

 

 

how can i search for "product34" within the variable $wert. and then proceed according on if then else statement

 

if someone can please help me out, i would really appreciate the same

 

thanks

 

 

hey guys,

thanks to all of you for your reply and responses. specially to "iwannabeleet" i used the preg_match that she recommended and it works beautifully.

i have a database installed and it works. i just need to make a small change and i could not figure out, so i wanted to use the above function. thanks again to all of you for taking time to reply to my query. i really appreciate the same.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.