In php, it is possible to manipulate string as like as we want, for example:
$temp2 = array();
$theindex = 0;
foreach($arraysimpanloop as $a) {
$temp1 = array();
for($i = 0; $i < sizeof($a)-1; $i++) {
$temp1[$i] = $a[$i];
}
natsort($temp1); // sort array temp1
$stringimplode = implode($temp1);
$temp2[$theindex] = $stringimplode;
$theindex++;
}
Since I'm using Java now, so I'm wondering how the line:
$temp2[$theindex] = $stringimplode;
written in Java code. Because I tried in java:
temp2[theindex]= stImplode; // here temp2 is array of string
and it is always returns a nullpointer.