"Sharmad Naik" <[EMAIL PROTECTED]> wrote in message
> Hi,
> I m extracting a variable from a dbase and assigning it as say
> $var .The Value of this variable is always a/or more number/s at the
> followed by a set of characters .I want to seperate the numbers from
> the characters.Can anybody explain me how to
> say value of $var= 511Tha

ereg("([0-9]*)([A-Za-z]*)", $var, $reg);

then $reg[1] = "511" and $reg[2] = "Tha";

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to