I have been creating arrays from plain text by using comma ,
(or any other special character) with the help of php's explode()
function like
$rawPhoneNumber = "800-555-5555";
$phoneChunks = explode("-", $rawPhoneNumber);
echo "Raw Phone Number = $rawPhoneNumber <br />";
echo "First chunk = $phoneChunks[0]<br />";
echo "Second chunk = $phoneChunks[1]<br />";
echo "Third Chunk chunk = $phoneChunks[2]";
But How can I create an associative array? Like how can I create an array like
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
from a plain text like "Peter=>35,Ben=>37,Joe=>43"