A little PHP help
I am working on my fathers website right now and I have run into a stupid yet probably easy PHP problem. I need to split up a line that has items seperated by commas and each item is inside quotes. The problem is, inside some of the quotes are more commas. This is how a line looks for instance:
"green", "blue", "yellow, red", "orange" I want to be able to split it up into: green blue yellow, red orange I have it setup like so: list($green, $blue, $yellowred, $orange) = split('REGEXBLAH!', $line); $line is a line of a file that holds the information. All help will be appreciated. |
Re: A little PHP help
PHP Code:
|
Re: A little PHP help
Didn't exactly work the way I wanted it to but I think I can work with it for now. It only just took all the quotes out and made it all into one line. I still want to seperate things by quotes.
|
| All times are GMT -4. The time now is 09:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.