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
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";
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
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
>
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.
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'
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
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
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
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
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
19 matches
Mail list logo