Possible Duplicate:
How can I split a comma delimited string into an array in PHP?
extract tags (words) from whole string
I'm trying to read a long variable into an array.
Variable $x = "text1", "text2", "text3",
etc...
$x = '"text1", "text2", "text3"';
Do I just call it into my array like:
array($x)?
This doesn't seem to work
I want the final product to be:
array("text1", "text2", "text3")
What am I doing wrong? Thanks!
EDIT:
Ok, some specifics:
I'm trying to replace the date fields in the following array with many dynamically read dates:
$myCalendar->setSpecificDate(array("2012-09-09", "2012-09-10"), 1, '');
I have the dynamically read dates in a variable $x. When I echo $x, I get something in the format "2012-09-09", "2012-09-10", "2012-09-09", "2012-09-10", "2012-09-09", "2012-09-10", etc
Thanks