I would like to Explode a string into an array that does not begin at
0 but I can't get it to work.
For example: $MyInfo = array(1 =27,68,31,19,40 );
will result in $MyInfo[1] = 27 ... $MyInfo[5] = 40
But, I'd like to process a string: "27,68,31,19,40 " such that it would
get the same result.
I tried:
$MyString = "27,68,31,19,40 "
$MyInfo = array(1 =$MyString);
But that doesn't work.
I also tried:
$MyString = "27,68,31,19,40 "
$MyInfo = array(1 =explode($MyStr ing, ","));
That doesn't do it either.
How can this be done?
0 but I can't get it to work.
For example: $MyInfo = array(1 =27,68,31,19,40 );
will result in $MyInfo[1] = 27 ... $MyInfo[5] = 40
But, I'd like to process a string: "27,68,31,19,40 " such that it would
get the same result.
I tried:
$MyString = "27,68,31,19,40 "
$MyInfo = array(1 =$MyString);
But that doesn't work.
I also tried:
$MyString = "27,68,31,19,40 "
$MyInfo = array(1 =explode($MyStr ing, ","));
That doesn't do it either.
How can this be done?
Comment