Re: [PHP] take text before '-' and after it

2002-12-12 Thread Justin French
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

Re: [PHP] take text before '-' and after it

2002-12-12 Thread 1LT John W. Holmes
> > $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

Re: [PHP] take text before '-' and after it

2002-12-12 Thread Antti
$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

Re: [PHP] take text before '-' and after it

2002-12-12 Thread Richard Baskett
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 -

Re: [PHP] take text before '-' and after it

2002-12-12 Thread Antti
[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

Re: [PHP] take text before '-' and after it

2002-12-12 Thread 1LT John W. Holmes
> 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

Re: [PHP] take text before '-' and after it

2002-12-12 Thread Michael Montero
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);

Re: [PHP] take text before '-' and after it

2002-12-12 Thread ed
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

[PHP] take text before '-' and after it

2002-12-12 Thread Antti
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