2008/10/31 Stut <[EMAIL PROTECTED]>:
> On 31 Oct 2008, at 17:32, Maciek Sokolewicz wrote:
>>
>> Kyle Terry wrote:
>>>
>>> -- Forwarded message --
>>> From: Kyle Terry <[EMAIL PROTECTED]>
>>> Date: Fri, Oct 31, 2008
On 31 Oct 2008, at 17:32, Maciek Sokolewicz wrote:
Kyle Terry wrote:
-- Forwarded message --
From: Kyle Terry <[EMAIL PROTECTED]>
Date: Fri, Oct 31, 2008 at 9:31 AM
Subject: Re: [PHP] Count the Number of Elements Using Explode
To: Alice Wei <[EMAIL PROTECTED]>
I wo
Kyle Terry wrote:
-- Forwarded message --
From: Kyle Terry <[EMAIL PROTECTED]>
Date: Fri, Oct 31, 2008 at 9:31 AM
Subject: Re: [PHP] Count the Number of Elements Using Explode
To: Alice Wei <[EMAIL PROTECTED]>
I would use http://us2.php.net/manual/en/function
Diogo Neves wrote:
Hi Alice,
U can simple do:
$nr = ( strlen( $message ) / 2 ) + 1 );
$nr = count( explode( '|', $message );
Or...
$num = (substr_count($message, "|") + 1);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ate: Fri, 31 Oct 2008 17:00:44 +
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: [EMAIL PROTECTED]; php-general@lists.php.net
> Subject: Re: [PHP] Count the Number of Elements Using Explode
>
> Hi Alice,
>
> U can simple do:
> $nr = ( strlen( $message ) / 2 )
Hi Alice,
U can simple do:
$nr = ( strlen( $message ) / 2 ) + 1 );
$nr = count( explode( '|', $message );
On Fri, Oct 31, 2008 at 4:32 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 31, 2008 at 11:29 AM, Alice Wei <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have a code snippet h
On Fri, Oct 31, 2008 at 11:29 AM, Alice Wei <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a code snippet here as follows:
>
> $message="1|2|3|4|5";
> $stringChunks = explode("|", $message);
>
> Is it possible to find out the number of elements in this string? It seems
> that I could do things
-- Forwarded message --
From: Kyle Terry <[EMAIL PROTECTED]>
Date: Fri, Oct 31, 2008 at 9:31 AM
Subject: Re: [PHP] Count the Number of Elements Using Explode
To: Alice Wei <[EMAIL PROTECTED]>
I would use http://us2.php.net/manual/en/function.array-count-values.php
Hi,
I have a code snippet here as follows:
$message="1|2|3|4|5";
$stringChunks = explode("|", $message);
Is it possible to find out the number of elements in this string? It seems
that I could do things like print_r and find out what is the last element of
$stringChunks is, but is th
9 matches
Mail list logo