HI hows all the PHP experts doing up for giving me a hand?
I have a string of text like the following
"Company:Scottish Ballet (SB) Pieces:The Snowman Dancers: Where:UK,Glasgow,Theatre Royal Reviewer:Janet Christie Publication:Scotland on Sunday Date:12/01/2003 Abstract: "Ashley Page, the Ballet's new artistic director, is set to announce the date of his eagerly-awaited first production in the next couple of months, but he has revealed: "It'll be a new production for next Christmas by me." We look forward to seeing something which can match The Snowman in terms of all round family entertainment, perfectly suited to the time of year."
I want to put it in an array where it splits up into 'company', 'Pieces', 'where'. 'publication', 'abstract'. this is so i can put it in a DB under these fields.
I thought at first it was going to be easy with the explode function using the ':' but sometimes the abstact has the ':' character in it so its not working that easy.
was wondering if there is a cool way to do this or will i have to search through the string for each of the headings split it up that way.
Anyhelp would be greatfull as i have hangover from hell today and cant think!!!then just change your : into a |. never seperate your content with a : as some words or sentances can use them. hence your problem.
if you change that for a pipe | life is more simplier.thanks i will give it a try
I have a string of text like the following
"Company:Scottish Ballet (SB) Pieces:The Snowman Dancers: Where:UK,Glasgow,Theatre Royal Reviewer:Janet Christie Publication:Scotland on Sunday Date:12/01/2003 Abstract: "Ashley Page, the Ballet's new artistic director, is set to announce the date of his eagerly-awaited first production in the next couple of months, but he has revealed: "It'll be a new production for next Christmas by me." We look forward to seeing something which can match The Snowman in terms of all round family entertainment, perfectly suited to the time of year."
I want to put it in an array where it splits up into 'company', 'Pieces', 'where'. 'publication', 'abstract'. this is so i can put it in a DB under these fields.
I thought at first it was going to be easy with the explode function using the ':' but sometimes the abstact has the ':' character in it so its not working that easy.
was wondering if there is a cool way to do this or will i have to search through the string for each of the headings split it up that way.
Anyhelp would be greatfull as i have hangover from hell today and cant think!!!then just change your : into a |. never seperate your content with a : as some words or sentances can use them. hence your problem.
if you change that for a pipe | life is more simplier.thanks i will give it a try