RE: [PHP] Other than substr
| From: | NCI/IMS) | Date: | Wed, 03 Jul 2002 16:41:10 +0000 |
| Subject: | RE: [PHP] Other than substr | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-105243@lists.php.net to get a copy of this message | ||
What do you want it to look like in the text boxes? If you just want to
take out the two parentheses, you can use strstr to get the index of the ")"
string to use in your substring statement.
http://www.php.net/manual/en/function.strstr.php
I hope this helps!
-Natalie
-----Original Message-----
From: César Aracena [mailto:icaam@icaam.com.ar]
Sent: Wednesday, July 03, 2002 12:36 PM
To: PHP General List
Subject: [PHP] Other than substr
Hi all.
I need to show up some data from a DB which consist of phone numbers with
area code. They're stored like (xxxx) xxxxxxxx. What is the best approach to
print them into some textboxes so they can be edited? I'm using substr but
area codes (inside parenthesis) goes from 3 to 5 numbers, so sometimes the
closing parenthesis is showed and other times even the first number from the
actual number is also showed. Can I use regex instead? How is it used? I
tried to figure it out in the PHP manual, but it is NOT written in my level
of English.
Thanks in advance,
<mailto:webmaster@icaam.com.ar> Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621