Hi,
Then you can do whatever you want with them... but I can't see why you'd
write them to a disk file AND write them to a mysql database -- wouldn't it
be one or the other?
on 13/12/02 2:49 AM, Antti ([EMAIL PROTECTED]) wrote:
> How can I take some text before the mark - and after it and pu
> > $array = explode("-",$song);
> >
> > ---John Holmes...
>
> Ok, I got this. But still I don't know how to read the files from a
> directory and put them into an array so I can explode them.
examples here:
http://www.php.net/manual/en/ref.dir.php
---John Holmes...
--
PHP General Mailing L
$array = explode("-",$song);
---John Holmes...
Ok, I got this. But still I don't know how to read the files from a
directory and put them into an array so I can explode them.
antti
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ive is devoid of the power to love. -
Dr. Martin Luther King, Jr.
> From: Antti <[EMAIL PROTECTED]>
> Date: Thu, 12 Dec 2002 17:49:14 +0200
> To: [EMAIL PROTECTED]
> Subject: [PHP] take text before '-' and after it
>
> How can I take some text before the mark -
[EMAIL PROTECTED] wrote:
Wouldn't it be simpler to just remove the '-'?
$var = str_replace("-","",$var);
Ed
On Thu, 12 Dec 2002, Antti wrote:
How can I take some text before the mark - and after it and put them for
example in array. The purpose of this is to read trough mp3 files which
a
> How can I take some text before the mark - and after it and put them for
> example in array. The purpose of this is to read trough mp3 files which
> are in the form of artist - song.mp3 and put them into a text file so I
> can put them into mysql db.
$array = explode("-",$song);
---John Holm
You can use split() or explode().
$string = "1234-5467" ;
list( $before_dash, $after_dash ) = explode( "-", $string ) ;
or
$array = explode( "-", $string ) ;
On Thu, 12 Dec 2002 [EMAIL PROTECTED] wrote:
>
> Wouldn't it be simpler to just remove the '-'?
>
> $var = str_replace("-","",$var);
Wouldn't it be simpler to just remove the '-'?
$var = str_replace("-","",$var);
Ed
On Thu, 12 Dec 2002, Antti wrote:
> How can I take some text before the mark - and after it and put them for
> example in array. The purpose of this is to read trough mp3 files which
> are in the form of art
How can I take some text before the mark - and after it and put them for
example in array. The purpose of this is to read trough mp3 files which
are in the form of artist - song.mp3 and put them into a text file so I
can put them into mysql db.
antti
--
PHP General Mailing List (http://www.ph
9 matches
Mail list logo