Hello everyone,

I am trying to learn how to use ereg_replace(), but I don't seem to be 
doing it correctly.

"$phone" is a 10-digit string.

I want to perform the following:

$phone = ereg_replace(".{10}", "[part where I am confused]", $phone);

I would like the output to be

$phone = "(555) 555-5555";

Can a regexp guru help me out? Thank you


PHP General 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