On Thu, Apr 22, 2010 at 1:29 PM, Paul Halliday wrote:
> Ex:
>
> "This is the string and it is this long"
>
> This is
> the string
> and it
> is this
> long
>
> I found some long functions to achieve this but I couldn't help but
> think that it could be done in a couple lines.
>
> Possible?
>
> Tha
Ex:
"This is the string and it is this long"
This is
the string
and it
is this
long
I found some long functions to achieve this but I couldn't help but
think that it could be done in a couple lines.
Possible?
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
Thank you very much!
Understand. And it Works very well now.
Cheers
-Mensagem original-
De: Ford, Mike [mailto:m.f...@leedsmet.ac.uk]
Enviada: quinta-feira, 23 de Julho de 2009 00:04
Para: php-general@lists.php.net
Assunto: RE: [PHP] Replace in a string with regex
> -Origi
> -Original Message-
> From: rszeus [mailto:rsz...@gmail.com]
> Sent: 22 July 2009 19:23
> To: 'Jim Lucas'
> Cc: 'Kyle Smith'; 'Eddie Drapkin'; a...@ashleysheridan.co.uk; php-
> gene...@lists.php.net
> Subject: RE: [PHP] Replace in a strin
Enviada: quarta-feira, 22 de Julho de 2009 18:44
> Para: rszeus
> Cc: 'Kyle Smith'; 'Eddie Drapkin'; a...@ashleysheridan.co.uk;
> php-general@lists.php.net
> Assunto: Re: [PHP] Replace in a string with regex
>
> rszeus wrote:
>> Thank you.
l-
De: Jim Lucas [mailto:li...@cmsws.com]
Enviada: quarta-feira, 22 de Julho de 2009 18:44
Para: rszeus
Cc: 'Kyle Smith'; 'Eddie Drapkin'; a...@ashleysheridan.co.uk;
php-general@lists.php.net
Assunto: Re: [PHP] Replace in a string with regex
rszeus wrote:
> Thank you. I unde
7;test';
>
> echo preg_replace('#(screen/)temp/(.+?)_1(.+?\.jpg)#', '$1'.$id, $file);
>
> I get screen/test
>
>
>
> Any ideas ?
>
>
>
> Thank you
>
>
>
> De: Kyle Smith [mailto:kyle.sm...@inforonics.com]
> Enviada: quart
uarta-feira, 22 de Julho de 2009 17:22
Para: rszeus
Cc: 'Eddie Drapkin'; a...@ashleysheridan.co.uk; 'Jim Lucas';
php-general@lists.php.net
Assunto: Re: [PHP] Replace in a string with regex
The first match inside () is assigned to $1, the second is assigned to $2, and
so on
ginal-
De: Eddie Drapkin [mailto:oorza...@gmail.com]
Enviada: quarta-feira, 22 de Julho de 2009 14:12
Para: rszeus
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Replace in a string with regex
On Wed, Jul 22, 2009 at 9:07 AM, rszeus wrote:
Hi. It Works to remove the _1 but it doesn
...
-Mensagem original-
De: Eddie Drapkin [mailto:oorza...@gmail.com]
Enviada: quarta-feira, 22 de Julho de 2009 16:03
Para: a...@ashleysheridan.co.uk
Cc: Jim Lucas; rszeus; php-general@lists.php.net
Assunto: Re: [PHP] Replace in a string with regex
On Wed, Jul 22, 2009 at 11:01 AM, Ashle
On Wed, Jul 22, 2009 at 11:01 AM, Ashley
Sheridan wrote:
> On Wed, 2009-07-22 at 07:54 -0700, Jim Lucas wrote:
>> Sure that can be done. But you will need to change the second argument
>> to have double quotes so it will be parsed by PHP.
>>
>> Then I would surround YOUR variable with curly bracke
quot;$1{$id}$3",
>> $file);
>>
>> > I am confusing " and '.
>> >
>> > Thank you
>> >
>> >
>> > -Mensagem original-
>> > De: Eddie Drapkin [mailto:oorza...@gmail.co
>
> > -Mensagem original-
> > De: Eddie Drapkin [mailto:oorza...@gmail.com]
> > Enviada: quarta-feira, 22 de Julho de 2009 14:12
> > Para: rszeus
> > Cc: php-general@lists.php.net
> > Assunto: Re: [PHP] Replace in a string with regex
> >
"$1{$id}$3",
$file);
> I am confusing " and '.
>
> Thank you
>
>
> -Mensagem original-
> De: Eddie Drapkin [mailto:oorza...@gmail.com]
> Enviada: quarta-feira, 22 de Julho de 2009 14:12
> Para: rszeus
&g
27;.
Thank you
-Mensagem original-
De: Eddie Drapkin [mailto:oorza...@gmail.com]
Enviada: quarta-feira, 22 de Julho de 2009 14:12
Para: rszeus
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Replace in a string with regex
On Wed, Jul 22, 2009 at 9:07 AM, rszeus wrote:
>
You can disregard this, it's wrong (I missed a part of the requirements
:) and there's other solutions already provided (my email client is
weird when you switch to a folder it always displays the first entry as
the last read, so sometimes I miss that there are new posts above... I
just switche
rszeus wrote:
Hello,
I’m tryng to make some replacements on a string.
Everything goês fine until the regular expression.
$file = "screens/temp/7a45gfdi6icpan1jtb1j99o925_1_main.jpg";
echo $a = str_replace(array(7a45gfdi6icpan1jtb1j99o925,
'temp/',’_([0-9])’), array(“test”,"",””), $file)
leysheridan.co.uk]
Enviada: quarta-feira, 22 de Julho de 2009 13:20
Para: rszeus
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Replace in a string with regex
On Wed, 2009-07-22 at 13:02 +0100, rszeus wrote:
> Hello,
>
> I’m tryng to make some replacements on a string.
>
> Ever
a: quarta-feira, 22 de Julho de 2009 13:11
> Para: rszeus
> Cc: php-general@lists.php.net
> Assunto: Re: [PHP] Replace in a string with regex
>
> On Wed, Jul 22, 2009 at 8:02 AM, rszeus wrote:
>> Hello,
>>
>> I’m tryng to make some replacements on a string.
>>
Hi. It Works to remove the _1 but it doesn't replace
'7a45gfdi6icpan1jtb1j99o925' for 'test'
Thank you
-Mensagem original-
De: Eddie Drapkin [mailto:oorza...@gmail.com]
Enviada: quarta-feira, 22 de Julho de 2009 13:11
Para: rszeus
Cc: php-general@lists.
On Wed, 2009-07-22 at 13:02 +0100, rszeus wrote:
> Hello,
>
> I’m tryng to make some replacements on a string.
>
> Everything goês fine until the regular expression.
>
>
>
> $file = "screens/temp/7a45gfdi6icpan1jtb1j99o925_1_main.jpg";
>
> echo $a = str_replace(array(7a45gfdi6icpan1jtb1j99o
On Wed, Jul 22, 2009 at 8:02 AM, rszeus wrote:
> Hello,
>
> I’m tryng to make some replacements on a string.
>
> Everything goês fine until the regular expression.
>
>
>
> $file = "screens/temp/7a45gfdi6icpan1jtb1j99o925_1_main.jpg";
>
> echo $a = str_replace(array(7a45gfdi6icpan1jtb1j99o925,
> 't
Hello,
Im tryng to make some replacements on a string.
Everything goês fine until the regular expression.
$file = "screens/temp/7a45gfdi6icpan1jtb1j99o925_1_main.jpg";
echo $a = str_replace(array(7a45gfdi6icpan1jtb1j99o925,
'temp/',_([0-9])), array(test,"",), $file)
The idea is t
Rahul Sitaram Johari wrote:
> Ave,
>
> Can¹t figure this one out. I¹m using the dbase_replace_record() function to
> replace a record in a dbase (.dbf) database. I just want to replace the
> value of one of the fields with another value. This is my code:
>
> $db = dbase_open("CRUMBS.DBF", 2) or d
Ave,
Can¹t figure this one out. I¹m using the dbase_replace_record() function to
replace a record in a dbase (.dbf) database. I just want to replace the
value of one of the fields with another value. This is my code:
$db = dbase_open("CRUMBS.DBF", 2) or die("Fatal Error: Could not open
database!
Rafael Mora wrote:
> Hi!
>
> i want to send a file or output stream in a .php, but first compress it, I
> tryed the example to compress files but how do i do to send as answer to
> the
> http request??
trye the other example
>
> Rafa
>
--
PHP General Mailing List (http://www.php.net/)
To un
Hi!
i want to send a file or output stream in a .php, but first compress it, I
tryed the example to compress files but how do i do to send as answer to the
http request??
Rafa
At 5:04 PM +0200 8/29/06, Reinhart Viane wrote:
About the language remark:
I believe you try to say I need to find a way that the client can add 25
languages without me having to change the database layout or the coding?
Well I can assure you this will not be the fact. The client only needs these
8:37 PM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] replace single and double quotes
Reinhart Viane wrote:
> This is the code is use to insert/update text into a database field:
>
> $sqledit="update activities set act_extra='$_POST[editextra]',
: dinsdag 29 augustus 2006 15:37
> Aan: [EMAIL PROTECTED]
> CC: php-general@lists.php.net
> Onderwerp: Re: [PHP] replace single and double quotes
>
> Reinhart Viane wrote:
>> This is the code is use to insert/update text into a database field:
>>
>> $sqledit=&quo
Ok 'ill give this a shot together with the guidelines from jochen.
Thx afan.
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 29 augustus 2006 15:28
Aan: [EMAIL PROTECTED]
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] replace singl
, didn't think this question was about to bring up what I was
looking for in the back of my head
-Oorspronkelijk bericht-
Van: Jochem Maas [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 29 augustus 2006 15:37
Aan: [EMAIL PROTECTED]
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] replace s
ot;, $act_extra, $act_extra_fr, $act_id);
Notice the %d for the id part if $act_id should be integer.
/Peter
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 29, 2006 8:28 PM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] re
Reinhart Viane wrote:
> This is the code is use to insert/update text into a database field:
>
> $sqledit="update activities set act_extra='$_POST[editextra]',
> act_extra_fr='$_POST[editextrafr]' where act_id=$_POST[editid]";
this indicates 'bad' database design ... because adding a language inv
[EMAIL PROTECTED] wrote:
> since I had something similar as a problem, let m etry to anser ang see
> did I get it correct :)
seems ok ...
>
> first, and most important: never store in DB row submitted string
>
> $act_extra = mysql_real_escape_string($_POST[editextra]);
> $act_extra_fr = mysql_r
since I had something similar as a problem, let m etry to anser ang see
did I get it correct :)
first, and most important: never store in DB row submitted string
$act_extra = mysql_real_escape_string($_POST[editextra]);
$act_extra_fr = mysql_real_escape_string($_POST[editextrafr])
$act_id = mysql
This is the code is use to insert/update text into a database field:
$sqledit="update activities set act_extra='$_POST[editextra]',
act_extra_fr='$_POST[editextrafr]' where act_id=$_POST[editid]";
Now both $_POST[editextra] and $_POST[editextrafr] can contain single or
double quotes.
So the query
I hope this is what you were looking for:
$contents = "Numbers 1, 2, 3, 4 and 5 will be replaced with A, B, C, D, and E";
$searcharr = array("1", "2", "3", "4", "5");
$replacearr = array("A", "B", "C", "D", "E");
$newcontents = str_replace($searcharr, $replacearr, $contents);
echo $newcontents;
Hi all
if I have an array of chars to be replaced array(1,2,3,4,5);
and an arry of chars to replace with array(a,b,c,d,e)
what function do I need to replace all chars from one arry to the other that
are found in the var $contents
Thanks
M
--
PHP General Mailing List (http://www.php.net/)
John Taylor-Johnston wrote:
Can someone show me how to get rid of international characters in
$string? Is there a function already made?
the acute/grave accents on the chars are called 'diacritics'
You cannot use accented characters in a name reference : name="montréal">.
I guess this below i
Look into strtr()
http://www.php.net/strtr
It seems to be precisely what you want.
John Taylor-Johnston wrote:
Can someone show me how to get rid of international characters in
$string? Is there a function already made?
You cannot use accented characters in a name reference : name="montréal">
Can someone show me how to get rid of international characters in
$string? Is there a function already made?
You cannot use accented characters in a name reference : name="montréal">.
I guess this below is a start. Is there a better way?
John
http://ca.php.net/manual/en/function.str-replace.php
On Thursday 24 February 2005 16:14, Frank Arensmeier wrote:
> 1) replace ".." with a string like "file://server/folder"
> 2) replace all "\" characters with "/".
>
> The PHP code looks something like:
>
> $path_to_file = "..\1 PDF Filer\65051.PDF";
$path_to_file = '..\1 PDF Filer\65051.PDF';
D
Hello everybody!
I was wondering if you could help me with a little problem I ran into
some days ago.
In my database I have some information about file paths. Originally,
those paths come from a Windows Excel spreadsheet and look like "..\1
PDF Filer\65051.PDF". In my PHP code I try to do two t
blackwater dev wrote:
thanks...I will look that up. Not very good with regular expressions though.
this is your chance to get a bit better. have a go,
if you get stuck post your code :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thanks...I will look that up. Not very good with regular expressions though.
On Fri, 28 Jan 2005 08:11:59 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]>
wrote:
> blackwater dev wrote:
> > I have a section of my site that uses HTMLArea to allow the users to
> > manage content. For one certain s
blackwater dev wrote:
> I have a section of my site that uses HTMLArea to allow the users to
> manage content. For one certain section, they want all of their links
> to pop up in another window. I know they can use HTMLArea and add
> this code themselves but they don't want to get to the code si
I have a section of my site that uses HTMLArea to allow the users to
manage content. For one certain section, they want all of their links
to pop up in another window. I know they can use HTMLArea and add
this code themselves but they don't want to get to the code side of
it.
Currently, I just p
On Tue, 25 Jan 2005 16:29:38 -, Chris Ramsay
<[EMAIL PROTECTED]> wrote:
>
>
> >Hey!
> >I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!?
>
>
>
> I have received this also with both my postings today...and probably will
> again...
>
I've just sent ONE message to the list
Mike Johnson wrote:
From: Richard Davey [mailto:[EMAIL PROTECTED]
Hello Afan,
Tuesday, January 25, 2005, 4:12:43 PM, you wrote:
AP> Hey!
AP> I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!?
Join the club.. everyone who posts gets one. Annoying, no?
Best regards,
Richard Davey
>Hey!
>I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!?
I have received this also with both my postings today...and probably will
again...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello Chris,
Tuesday, January 25, 2005, 5:07:37 PM, you wrote:
CR> Maybe that's another thing to add to the [NEWBIE GUIDE] - I would have found
CR> it useful! ;)
Ahh... so you're the Russian mail server? :)
I guess we could add "don't be a twat with your auto-responders" to
the newbie faq, but
Join the club.. everyone who posts gets one. Annoying, no?
Maybe that's another thing to add to the [NEWBIE GUIDE] - I would have found
it useful! ;)
Chris Ramsay
-
Web Developer - The Danwood Group Ltd.
T: +44 (0) 1522 834482
F: +
Not at all... Actually, I enjoy :-D
I just wonder what's going on and is it problem on my side or... Now I
breath easier...
;-)
-afan
Richard Davey wrote:
Hello Afan,
Tuesday, January 25, 2005, 4:12:43 PM, you wrote:
AP> Hey!
AP> I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!
From: Richard Davey [mailto:[EMAIL PROTECTED]
> Hello Afan,
>
> Tuesday, January 25, 2005, 4:12:43 PM, you wrote:
>
> AP> Hey!
> AP> I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!?
>
> Join the club.. everyone who posts gets one. Annoying, no?
>
> Best regards,
>
> Richard
[snip]
I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!?
What's going on?
[/snip]
I have been getting it with every send too...off to /dev/null
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello Afan,
Tuesday, January 25, 2005, 4:12:43 PM, you wrote:
AP> Hey!
AP> I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!?
Join the club.. everyone who posts gets one. Annoying, no?
Best regards,
Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I a
Jay Blanchard wrote:
[snip]
I need to replace all the numbers of a credit card except for the last
4 with an 'X' ... can't seem to locate the string function for this...
can someone point me in the right direction here to what php item i
should be using.
[/snip]
ROFLMMFAO! It's all been discussed b
In addition to what was mentioned already, using ereg_replace, if you're
pulling the CC# string out of a database of off of some POST data or something,
just use a substr() function to pull the last 4 digits and prepend a bunch of
X's.
$ccnum = "342342522342342"; # fake CC #, prob not even cor
Joe Harman wrote:
Hello,
I need to replace all the numbers of a credit card except for the last
4 with an 'X' ... can't seem to locate the string function for this...
can someone point me in the right direction here to what php item i
should be using.
that'll be:
string php_replace_all_but_last_fou
Hey!
I just got this emai lfrom RIPN mail processor at Moscow ?!?!?!?!?
What's going on?
-afan
Original Message
Subject: DNS.050125191312.29782 (Re: Re: [PHP] Replace credit card
numbers with X ???)
Date: Tue, 25 Jan 2005 19:13:27 +0300
From: RIPN NCC <[EMAIL PROTEC
this is my way.
$cc_stars = '';
$cc_no_lenght = strlen($cc_number);
$cc_info_first4 = substr($cc_number, 0, 4);
$cc_info_last4 = substr($cc_number, (strlen($cc_number) - 4), 4);
for($i=0; $i<($cc_no_lenght-8); $i++) $cc_stars .= '*';
$cc_number = $cc_info_f
[snip]
I need to replace all the numbers of a credit card except for the last
4 with an 'X' ... can't seem to locate the string function for this...
can someone point me in the right direction here to what php item i
should be using.
[/snip]
ROFLMMFAO! It's all been discussed before Joe!
http://
Hello,
I need to replace all the numbers of a credit card except for the last
4 with an 'X' ... can't seem to locate the string function for this...
can someone point me in the right direction here to what php item i
should be using.
Thanks!
Joe
--
PHP General Mailing List (http://www.php.net/)
Hi,
> > I have a string: ##CODE## and I want to replace that with > href="somewhere.php?id=CODE">CODE
I handle %code% tags in some templates I use... here's the code I have..
function show ($template, $tag) {
$file = fopen ($template, "r") or
die($error_
$var="##testcode##this is a ##code1## test of the ##code2## code
replacement system ##code3##";
$varParsed=strParse($var);
echo "$var";
echo $varParsed;
function strParse($origString)
{
while ( $offsetFALSE)
{
$tmpString=substr($origString, $lastEnd, $foundBeg-$lastEnd);
$tm
id.'">',
$orig_text);
$new_text = str_replace( '#/', '', $new_text);
see:
http://www.php.net/manual/en/ref.strings.php
HTH
Graham
-Original Message-
From: Gareth Williams [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 09:38
To: mario
Cc: [EMAIL PROTECTED]
S
Well, if you can do it without a regex, then it's always best, because
the regex engine slows things down.
On 30 Sep 2004, at 10:39, mario wrote:
Hi all
I have a string: ##CODE## and I want to replace that with CODE
can u help?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vis
Hi all
I have a string: ##CODE## and I want to replace that with CODE
can u help?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 17:51 14-09-2004, Diana Castillo wrote:
Anyone know of any function to replace letters with accents with just the
regular letter, for instance replace á with a,
ç with c, ñ with n ?
How about this ??? This is the one I made for this purpose
function stripAccents($string) {
$returnString = strt
Diana Castillo wrote:
Anyone know of any function to replace letters with accents with just the
regular letter, for instance replace á with a,
ç with c, ñ with n ?
found this on the strtr() manual page (http://php.net/strtr):
'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh',
'ß' => 'ss', 'Œ'
Diana Castillo wrote:
Anyone know of any function to replace letters with accents with just the
regular letter, for instance replace á with a,
ç with c, ñ with n ?
$string = str_replace(array('á', 'ç', 'ñ'), array('a', 'c', 'n'), $string);
--
PHP General Mailing List (http://www.php.net/)
To uns
On Tue, 14 Sep 2004 17:51:00 +0200, Diana Castillo <[EMAIL PROTECTED]> wrote:
> Anyone know of any function to replace letters with accents with just the
> regular letter, for instance replace á with a,
> ç with c, ñ with n ?
str_replace(), eregi_replace()
--
Greg Donald
http://destiney.com/
-
Anyone know of any function to replace letters with accents with just the
regular letter, for instance replace á with a,
ç with c, ñ with n ?
--
Diana Castillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Jay Blanchard wrote:
> > Yes, anything is possible.
>
> Can I be the next Queen of England?
>
> --
> John C. Nichel
Anythings possible...and with all your choices you
want to be an old fart??
:-)
=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity
Jay Blanchard wrote:
Yes, anything is possible.
Can I be the next Queen of England?
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Is it possible to replace a button by an image with
PHP?
[/snip]
Yes, anything is possible. http://phpbutton.sourceforge.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
Is it possible to replace a button by an image with
PHP?
Thanks!
Dave
Vous manquez despace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger e
On Monday 26 July 2004 10:09, Turbo wrote:
> I have array variable and string variable.
> I want to replace value of array by key of array in string variable
> with preg_replace().
>
> Example :
> $message=array(
> 'name'=>'My Computer',
> 'version'=>'1.0'
> );
> $strValue="I am $name,build versi
Hi,
I have array variable and string variable.
I want to replace value of array by key of array in string variable
with preg_replace().
Example :
$message=array(
'name'=>'My Computer',
'version'=>'1.0'
);
$strValue="I am $name,build version $version\n";
How's to replace?
Yingyos
--
PHP General M
Hello all,
If I have a string like this 123.456.789.01 , where dots are used to
separate the thousands and the decimal part.
How can I first detect this situation? More than one dot. I guess I
could use str_word_count() from the manual, right?
Then, once I have determined there are more than on
str_replace(" ","+",$var);
-- red
Vernon wrote:
I want to be able to replace a space that comes from a form field (such as
in 123 My Street) with a + sign.
Can anyone help me with this?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://www.php.net/str-replace
On Wed, 2004-03-17 at 15:48, Vernon wrote:
> I want to be able to replace a space that comes from a form field (such as
> in 123 My Street) with a + sign.
>
> Can anyone help me with this?
>
> Thanks
--
Adam Voigt
[EMAIL PROTECTED]
--
PHP General Mailing List (
I want to be able to replace a space that comes from a form field (such as
in 123 My Street) with a + sign.
Can anyone help me with this?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
so, and still works fine. Why not stay with a winner?
-Original Message-
From: Brent Baisley
To: carlos castillo
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 2004-02-17 21:02
Subject: [PHP-WIN] Re: [PHP] Replace of ' in a query
Look at the addslashes command. You should always e
Look at the addslashes command. You should always escape the values you
are accepting from user input. If you read almost any article on web
site security, it will mention something called SQL injection among
other things. This is a way to compromise your data.
For instance, what if a user enter
--- carlos castillo <[EMAIL PROTECTED]> wrote:
> Hi , i have the following problem, i have a form where a user can input
> any text, on that text may be a char is ' char(39) when i try to execute
> the sql query, i have an error for that ', i need to replace it for the
> html tag, for example " is
Hi , i have the following problem, i have a form where a user can input
any text, on that text may be a char is ' char(39) when i try to execute
the sql query, i have an error for that ', i need to replace it for the
html tag, for example " is " or by chr(39) i dont know, and then
execute the sql
Diana Castillo wrote:
How do I replace all single quotes with double quotes in a string for
echoing it with the double quotes?
By looking here...
http://us4.php.net/str_replace
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubs
str_replace(''',"'", $StringToReplace);
should work
-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 4:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] replace ' with "
How do I replace all single q
Diana Castillo wrote:
How do I replace all single quotes with double quotes in a string for
echoing it with the double quotes?
$text = str_replace("'", '"', $text);
http://php.net/str_replace and please at least RTFM before posting here
in future.
--
Stuart
--
PHP General Mailing List (http://ww
How do I replace all single quotes with double quotes in a string for
echoing it with the double quotes?
--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 ext 214
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
on Tue, 2 Dec 2003 23:46:33 +0100 I already wrote, regarding replacing
macro %rand[x]-[y] with random of random length ([x]-[y]).
Before, I had my own (slow!) procedure to find next occurence of the
macro and generated a new string, which was returned.
This took about 15 seconds for 10.000 addres
on 02 Dec 2003 18:56:28 -0500 Robert Cummings wrote:
RC> I missed the original post, and I'm too lazy to go looking, but the
RC> following code runs in approx. 2.75 seconds on my Athlon 2400 running
RC> linux:
it is 4.3 seconds on xp 1600+..
RC> $chars = '0123456789'
RC> .'abcdef
on Tue, 2 Dec 2003 23:33:47 + Richard Davey wrote:
RD> Just so we're clear on this - you're creating a string (an email
RD> address) of a million characters? I don't know my mail RFC's that well, but
RD> I'm sure this is well beyond what it considers "standard".
We're not clear.. ;)
the funct
On Tue, 2003-12-02 at 18:33, Richard Davey wrote:
> Hello Daniel,
>
> Tuesday, December 2, 2003, 10:46:33 PM, you wrote:
>
> dh> For generation of a random string with length 1.000.000 it takes about
> dh> 13 seconds on my xp 1600+.. that's quite a lot, imho, so suggestions
> dh> are very welcome
Hello Daniel,
Tuesday, December 2, 2003, 10:46:33 PM, you wrote:
dh> For generation of a random string with length 1.000.000 it takes about
dh> 13 seconds on my xp 1600+.. that's quite a lot, imho, so suggestions
dh> are very welcome..
Just so we're clear on this - you're creating a string (an e
Hello PHP-list,
I'm building a script, that provides a honeypot of invalid email
addresses for spambots.. for this I want to provide a macro for the
templates that looks like %rand[x]-[y]%, where [x] and [y] are
integers, that specify the length of the random script.
My first thoughts were about t
* Thus wrote ada ([EMAIL PROTECTED]):
> > What do you mean trim() doesn't work?
>
> trim is a basic function that remove spaces on the left and the right at the
> string :
> " abc"->"abc"
trim() removes more than spaces, please read:
http://php.net/trim
What I meant in my original post wa
> What do you mean trim() doesn't work?
trim is a basic function that remove spaces on the left and the right at the
string :
" abc"->"abc"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
1 - 100 of 162 matches
Mail list logo