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
>
...
$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
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
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";
> >>
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
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
* 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
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
I'm not sure what the problem is. Everything's working smoothly on my end.
Edward Dudlik
Becoming Digital
www.becomingdigital.com
- Original Message -
From: "Kaan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, 25 September, 2003 13:08
Subject: [PHP] Rea
>
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.
> 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.
Kevin,
first, change your URL statement to: http://.../test.php?test=1 // the $
is not needed.
second, use $test=$_GET['test'] to get the transferred value into $test.
then, echo $test and see if it works.
Hugh
- Original Message -
From: "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]>
To:
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
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
14 matches
Mail list logo