Hey Guys!
The past few times I've posted I haven't gotten any responses so I'm hoping you all will pull through for me this time! 😃
I have no problem dealing with normal arrays but when it goes beyond that I get a little lost. Here's what I'm needing to do:
I am getting back a string of data that looks like this:
data1 | data2 | data3 | data4 | data5 data1 | data2 | data3 | data4| data5 data1 ... and so on...
Basically out of all that mess I really only need the values of data2 and data4. If I explode the data by the pipes, I can reference both of these. But what I have is really messy, I need to combine this process into one step. Any suggestions?
Thanks!!
//Output: PK FIELD NAME | Text Field Name | Latitude , Longitude | X , Y
$results = explode("|", $mapdata);
$len = count ($results);
$mls_no = array();
$feature_points = array();
$a=0;
$i = 1;
while($i <= $len){
$num[$a] = $results[$i];
$feature[$a][0] = $results[$i];
$feature[$a][1] = $results[$i+1];
$a++;
$i = $i + 3;
}
$list = "";
$FEATURES = "";
$len = count($mls_no);
foreach($num as $no){
$list .= $no . ",";
}
$i=0;
while($i < $len-1){
$FEATURES .= "FEATURE" . $i . "=" . $feature[$i][0]
$i++;
}