On Monday 01 July 2002 22:47, Beverly Steiner wrote:
> Uli & others,
>
> Thanx for the suggestions.  This works as stated but the data already
> exists in this format from an old database and I'm trying to parse it into
> logical fields.  Originally the data in the field looked something like
> 1$General/ms1.zip#12$Another/xqy.zip#.  I deleted the ending # then used
> explode to separate the information on the # and now I need to separate the
> info before the $ from what comes after it.  I've tried everyone's
> suggestions but they only work if I'm testing and can define the string
> using single quotes.
>
> How can I split on a $ 

<? # split string on '$'
  $doo = '1$General/ms1.zip';
  $dah = explode('$', $doo);
  print_r($dah);
?>

>or change the $ to something else if I'm getting the
> information from a database (MySQL), not defining it using single quotes
> like in your example?

I think you're confused. There is nothing in MySQL which dictates strings as 
single-quoted or double-quoted. I think you had best post some code. Show us 
how you're retrieving the data from MySQL.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Two heads are better than one.
                -- John Heywood
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to