Re: [PHP] Really simple regex

2005-06-09 Thread Dotan Cohen
On 6/8/05, John Nichel <[EMAIL PROTECTED]> wrote: > preg_replace ( "/x+/", "x", $string ); > preg_replace ( "/x{1,}/", "x", $string ); > > But those will also change a letter 'x' in a word, so you'll probably > need to tinker with that part too. > > -- > John C. Nichel > ÜberGeek > KegWorks.com >

Re: [PHP] Really simple regex

2005-06-09 Thread Jochem Maas
... $string="I have apples!"; $string=preg_replace("/x+/sim","x", $string); print "$string"; ... Thanks, that did it. I did not know about the +. And what is the 'sim' its not one thing but 3 things, everything that comes after a regexp closing marker (but inside the string) is

Re: [PHP] Really simple regex

2005-06-08 Thread John Nichel
Dotan Cohen wrote: Now, I know that this is easy, but I am embarassed to say that I can't find a regex tutorial that will show me how to match any occurances of x and replace them with one x: x >x xx > x x > x $string="I have apples!"; $string=preg_replace("-regex here-","x", $stri

Re: [PHP] Really simple regex

2005-06-08 Thread Dotan Cohen
On 6/8/05, Jochem Maas <[EMAIL PROTECTED]> wrote: > Dotan Cohen wrote: > > On 6/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > >>Quoting Dotan Cohen <[EMAIL PROTECTED]>: > >> > >>$string="I have apples!"; > >>$string=preg_replace("/x+/sim","x", $string); > >>print "$string"; > >>

Re: [PHP] Really simple regex

2005-06-08 Thread Jochem Maas
Dotan Cohen wrote: On 6/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Quoting Dotan Cohen <[EMAIL PROTECTED]>: $string="I have apples!"; $string=preg_replace("/x+/sim","x", $string); print "$string"; hope it helps.. Now, I know that this is easy, but I am embarassed to say th

Re: [PHP] Really simple regex

2005-06-08 Thread Dotan Cohen
On 6/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Quoting Dotan Cohen <[EMAIL PROTECTED]>: > > $string="I have apples!"; > $string=preg_replace("/x+/sim","x", $string); > print "$string"; > > hope it helps.. > > > Now, I know that this is easy, but I am embarassed to say that I

Re: [PHP] Really simple regex

2005-06-08 Thread Matthew Weier O'Phinney
* Rory Browne <[EMAIL PROTECTED]> : > preg_replace("/x+/", "x", $string); should do it. Having that said, > regex generally comes back and bites me in the ass, so... That one won't -- that's spot on. > On 6/8/05, Dotan Cohen <[EMAIL PROTECTED]> wrote: > > Now, I know that this is easy, bu

Re: [PHP] Really simple regex

2005-06-08 Thread Rory Browne
preg_replace("/x+/", "x", $string); should do it. Having that said, regex generally comes back and bites me in the ass, so... On 6/8/05, Dotan Cohen <[EMAIL PROTECTED]> wrote: > Now, I know that this is easy, but I am embarassed to say that I can't > find a regex tutorial that will show me

[PHP] Really simple regex

2005-06-08 Thread Dotan Cohen
Now, I know that this is easy, but I am embarassed to say that I can't find a regex tutorial that will show me how to match any occurances of x and replace them with one x: x >x xx > x x > x $string="I have apples!"; $string=preg_replace("-regex here-","x", $string); print "$string";

Re: [PHP] Really Simple

2003-09-25 Thread Becoming Digital
tember, 2003 13:08 Subject: [PHP] Really Simple Hi Can someone look at this code for me For Some reason when I add any more: The form doesnt send!! What I want is to have two more hidden fields storing the data for country and contact thanks -Code--- Untitled Document

[PHP] Really Simple

2003-09-25 Thread Kaan
Hi Can someone look at this code for me For Some reason when I add any more: The form doesnt send!! What I want is to have two more hidden fields storing the data for country and contact thanks -Code--- Untitled Document Call-off Select the recipients and add the qu

Re: [PHP] Really simple string search question

2003-03-16 Thread Kevin - KD Micro Software
> To: "'Kevin - KD Micro Software'" <[EMAIL PROTECTED]>; "'PHP List'" <[EMAIL PROTECTED]> Sent: Monday, March 17, 2003 8:58 AM Subject: RE: [PHP] Really simple string search question > > Here's 3 examples: > > $var="www.

RE: [PHP] Really simple string search question

2003-03-16 Thread John W. Holmes
> Here's 3 examples: > $var="www.google.com"; > $var="blah blah google blah"; > $var="google rules"; > > Now I just want to see if $var contains the word 'google' in it - which www.php.net/strstr ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today.

[PHP] Really simple string search question

2003-03-16 Thread Kevin - KD Micro Software
Hello all, This is probably a really easy thing to answer but I don't know what the answer is so if you lot could help me I would appreciate it. Here's 3 examples: $var="www.google.com"; $var="blah blah google blah"; $var="google rules"; Now I just want to see if $var contains the word 'google'

Re: [PHP] really simple problem with GET

2003-03-12 Thread Hugh Danaher
t;[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 12, 2003 10:04 AM Subject: [PHP] really simple problem with GET > Hi, > > I am sorry if the level of this question is too simple but I can't figure > out what's wrong. I want to pass a variable

Re: [PHP] really simple problem with GET

2003-03-12 Thread Ray Hunter
You form tag should be passing the get request to the php script. example: ... In test.php all should work now... -- Ray On Wed, 2003-03-12 at 11:04, Poon, Kelvin (Infomart) wrote: > Hi, > > I am sorry if the level of this question is too simple but I can't figure > out what's wrong. I w

[PHP] really simple problem with GET

2003-03-12 Thread Poon, Kelvin (Infomart)
Hi, I am sorry if the level of this question is too simple but I can't figure out what's wrong. I want to pass a variable value through the URL using the Get method. FOr example http://.../test.php?$test=0 and my test.php code are as follow: BUt my outcome is hello so therefore

Re: [PHP] Really simple question - /php directory above /web tree .htaccess contents

2003-03-08 Thread Ernest E Vogelsinger
At 17:58 08.03.2003, news.php.net said: [snip] >I want to have the /php directory >one directory above the /web root >so it is not accessible from browser command line execution but >will execute from a click on an >html page. CGI-PHP is installed >but I nee

[PHP] Really simple question - /php directory above /web tree .htaccess contents

2003-03-08 Thread news.php.net
Greetings, I am using php on a Sun Cobalt Linux server with many virtual hosts. I want to have the /php directory one directory above the /web root so it is not accessible from browser command line execution but will execute from a click on an html page. CGI-PHP is installed but I need to know th