Good afternoon, I have this array from my Script. Here is my array
Array
(
[0] => Array
(
[0] => BACK
[1] => PACK
[2] => BBP160800103
[3] =>
[4] => G086-1
[5] => 8
)
[2] => Array
(
[0] => BACKPACK
[1] => BBP160500010
[2] => G114-3
)
[3] => Array
(
[0] => WSL160800024-WSL160800025
[1] => L83-5.JPG
)
[4] => Array
(
[0] => IA041017
[1] => L83-5.JPG
)
)
I get an array from this Script. I am using codeigniter 3
public function generatenewname(){
$this->load->helper('directory');
$map = directory_map( './assets/file_upload/md/temp/',FALSE, TRUE);
for($x=0;$x<count($map);$x++){
$newest[$x] = explode(" ",$map[$x]);
}
echo "<pre>";print_r($newest);
}
so from the array above I want to get this value BBP160800103,BBP160500010,WSL160800024,WSL160800025and IA041017how can I achieve it?
- UPDATE -
I am doing some update from my script (I'm trying)
public function generatenewname(){
$this->load->helper('directory');
$map = directory_map( './assets/file_upload/md/temp/',FALSE, TRUE);
for($x=0;$x<count($map);$x++){
$newest[$x] = explode(" ",$map[$x]);
for($y=0;$y<count($newest[$x]);$y++){
if(strlen($newest[$x][$y]) >= 7){
$file[] =$newest[$x][$y];
}
}
}
for($x=0;$x<count($file);$x++){
echo $x.' '. $file[$x].'<br>';
}
}
for my script above, I get this in my list
[n] BBP160800103
[n] BBP160500010
[n] WSL160800024-WSL160800025
I want to reach him
[n] BBP160800103
[n] BBP160500010
[n] WSL160800024
[n] WSL160800025
source
share