; -Original Message-
> From: Kris [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 6:29 PM
> To: Brian T. Allen; 'Jason k Larson'
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: fscanf
>
>
> Actually found a little problem
>
> I forgot to men
: "Brian T. Allen" <[EMAIL PROTECTED]>
To: "'Kris'" <[EMAIL PROTECTED]>; "'Jason k Larson'"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 10:58 AM
Subject: RE: [PHP] Re: fscanf
>
Thanx Brian...Works good enough for me :)
K
- Original Message -
From: "Brian T. Allen" <[EMAIL PROTECTED]>
To: "'Kris'" <[EMAIL PROTECTED]>; "'Jason k Larson'"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: We
son k Larson
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: fscanf
>
>
> I've tried
> $array = fscanf ($fp, "%s, %s, %s\n");
> earlier. It picks up
> array[0] == text,
>
> I need
> array[0] == text
> array[1] == text
> array[2] == text
>
AIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 9:52 AM
Subject: Re: [PHP] Re: fscanf
> I think he is looking more for:
> $array = fscanf ($fp, "%s, %s, %s\n");
>
> But with split, wouldn't that need to be:
>
> $array = spl
I think he is looking more for:
$array = fscanf ($fp, "%s, %s, %s\n");
But with split, wouldn't that need to be:
$array = split(', ', $line);
http://www.php.net/manual/en/function.split.php
or
$array = preg_split ('/[\s,]+/', $line);
using: http://www.php.net/manual/en/function.preg-split.php
Why not:
$array = split("[ ,]", $line);
?
On Wed, 22 Jan 2003, Kris wrote:
> Hi
>
> I'm having dramers with fscanf
> I have a line:
> text, text, text
>
> I can't work out how to scan removing the comma and whitespace.
> the text can be absolutle anything.
>
> at the moment I have
> $array = fs
here's some info. in reading, keep in mind that PHP's implementation is
mostly ANSI compatible.
http://www.neosoft.com/neosoft/man/scanf.3.html
"Harry.De" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> where can i find a discription of the possible options fo
8 matches
Mail list logo