php-db | 2001072
Date: 07/28/01
- Next message: Al Savage: "[PHP-DB] Re: Record Update Link"
- Previous message: Richard Chauvaux: "Re: [PHP-DB] Record Update Link"
- In reply to: Sharmad Naik: "[PHP-DB] Seperate a variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Sharmad Naik" <sharmad <email protected>> wrote in message
news:20010728210644.A830 <email protected>
> 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
begining
> 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: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Al Savage: "[PHP-DB] Re: Record Update Link"
- Previous message: Richard Chauvaux: "Re: [PHP-DB] Record Update Link"
- In reply to: Sharmad Naik: "[PHP-DB] Seperate a variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

