I've been trying to sort this out for weeks, but can't get anywhere. My issue is that I have an array in javascript but the individual phrases in the array also have commas in them. I am passing the array as a variable to php using POST and php is exploding the array into variables, but is also separating parts of the array members that have a comma.
Step 1: Array in javascript
wrongOnes = ("blah blah blah", "bing, boing, bing");
Step 2: read by php
$myArray = explode(',', $_POST["wrongOnes"]);
Step 3: this is then made into a message to be posted
foreach($myArray as $my_Array){
$message .= "\r\n".$my_Array;
}
You can see that the problem is exploding and separating at the commas makes extra members of $myArray.
I feel that the answer should be easy, but my current level of php is weak. Can anyone help?
Cheers
Charco.