mike wrote:
On 11/1/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
I noticed, while perusing the chop() manual page, that some people were giving
examples of Perl's
chop() and chomp() functions. Comments made about both said the examples were
good, but not correct.
what about trim(), rtrim() and
On 11/1/07, Jim Lucas <[EMAIL PROTECTED]> wrote:
> I noticed, while perusing the chop() manual page, that some people were
> giving examples of Perl's
> chop() and chomp() functions. Comments made about both said the examples
> were good, but not correct.
what about trim(), rtrim() and ltrim()
Quoting rouvas <[EMAIL PROTECTED]>:
> Simpler(?) approach:
>
> $element5 = current(array_splice(split(',',$csvstring),5,1));
>
> This is fun!
Indeed... and this looks just fine. A great solution. Thanks. :-)
-Søren
>
> -Stathis
>
> On Wednesday 26 October 2005 17:08, Jochem Maas wrote:
> > S
Simpler(?) approach:
$element5 = current(array_splice(split(',',$csvstring),5,1));
This is fun!
-Stathis
On Wednesday 26 October 2005 17:08, Jochem Maas wrote:
> Sψren Schimkat wrote:
> > Hi guys
> >
> > I would like to convert this ..
> >
> >
> > $tmparray = split(',', $csvstring);
>
> don't u
Søren Schimkat wrote:
Hi guys
I would like to convert this ..
$tmparray = split(',', $csvstring);
don't use split() here - there is no need for regexp.
use explode() instead.
$element5 = $tmparray[5];
. to something like this:
$element5 = (split(',', $csvstring))[5];
$csvstring = "1,
[snip]
$tmparray = split(',', $csvstring);
$element5 = $tmparray[5];
. to something like this:
$element5 = (split(',', $csvstring))[5];
[/snip]
The syntax is correct in your first example, AFAIK the PERL syntax you
describe cannot be done straight up in PHP unless you write a function to
handle
6 matches
Mail list logo