Jump to content

[SOLVED] String contains only letters and numbers


npsari

Recommended Posts

I am trying to create an if fucntion which will tell me if a string is a number or a letter only

i dont want anything else, not even spaces

 

$string = "Anything here";

if($string = [b]pattern[/b]) {
print"Wrong";
} else {
print"Right";
}

 

Can you tell me how to do it please

can you tell me the Pattern

 

 

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.