[need quick help!!]finding numbers inside a string!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: [need quick help!!]finding numbers inside a string!

Post by requinix »

Code: Select all

if (preg_match('/\d/', $text)) {
    // has a number
}
Post Reply