skibascott
IS-IT--Management
When I perform an echo on $file_list in the following code, my output is simply "Array".
Is this the actual contents of $file_list? Or does it contain all of the elements in the array? When I use the following code:
I get the contents of the array. Do I need to use this foreach function in order to perform operations on the individual elements of the array? Or can I use $file_list in the following way to perform operations on this array?
Code:
$list = "cd /mnt/sc_proc/video; ls *.wmv | sort"; exec($list,$file_list);
Is this the actual contents of $file_list? Or does it contain all of the elements in the array? When I use the following code:
Code:
foreach ($file_list as $value)
{
echo $value."<br>";
}
I get the contents of the array. Do I need to use this foreach function in order to perform operations on the individual elements of the array? Or can I use $file_list in the following way to perform operations on this array?
Code:
for($i=0; $i<count($file_list); $i++){
if ($phpdocnum == substr($file_list[$i], 0, 7)){
echo $file_list[$i];
}else{
}
}