Hi,
Sunday, April 25, 2004, 3:15:25 PM, you wrote:
AB> ok sorry but since i never used preg_* before i dont quite get what some of
AB> this stuff means. i looked at the doc page for it but it doesnt make mention
AB> at all of what \d, \w, \s or any of those things mean... i only assume that
AB> \
[snip]
$phone = '1234567890';
$newphone = preg_replace('/(\d{3})(\d{3})(\d)/','(\1)\2-\3',$phone);
echo $newphone.'';
--
regards,
Tom
[/snip]
ok sorry but since i never used preg_* before i dont quite get what some of
this stuff means. i looked at the doc page for it but it doesnt make mention
at
Hi,
Sunday, April 25, 2004, 11:17:16 AM, you wrote:
AB> hi...
AB> i have a string i want to pull out of a database (mysql). the column name is
AB> Phone1 and it is a 10 digit phone number. the raw string coming out of the
AB> table column would look like this: 1234567890
AB> what i want to do is
hi...
i have a string i want to pull out of a database (mysql). the column name is
Phone1 and it is a 10 digit phone number. the raw string coming out of the
table column would look like this: 1234567890
what i want to do is format the string on display like this: (123)456-7890
but dont quite kno
SET ad_contact = '%s' WHERE subid = 43",
$esAdContact);
$r = mysql_query($q, $CCB) or print(mysql_error());
Thanks,
James
-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 4:45 AM
To: James Johnson; [EMAIL PROTECTED]
Subject:
James Johnson wrote:
Hi,
I'm trying to generate a string that contains a , to insert into a MySQL
table. It appears the is being stripped out either just before or
during the update.
http://www.php.net/mysql-escape-string
--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PH
Hi,
I'm trying to generate a string that contains a , to insert into a MySQL
table. It appears the is being stripped out either just before or
during the update.
** code **
// has both info, update both
$ad_contact = $tr_email;
$ad_contact .= "";
$pSep = "-";
$ad_contact .= $tr_p1AC;
$ad_conta
7 matches
Mail list logo