i have two arrays in php
Array
(
[0]=>30
)
Array
(
[0]->43
)
i want to merge these arrays in a single array my desired output is
Array
(
[0]=>30
[1]=>43
)
can anyone tell me how to achieve this
function get_minutes($sess_time)
{
# code...
if (strstr($sess_time, ':'))
{
$separatedData = split(':', $sess_time);
$minutesInHours = $separatedData[0] * 60;
$minutesInDecimals = $separatedData[1];
$totalMinutes = $minutesInHours + $minutesInDecimals;
}
else
{
$totalMinutes = $sess_time * 60;
}
if ($totalMinutes<=60)
{
# code...
return $totalMinutes;
}
else
{
$result=$totalMinutes/60;
$y=explode(".",$result);
$hours=$y[0];
$hours_mins=$hours*60;
$remaining_mins=$totalMinutes-$hours_mins;
$remaining_array=array($remaining_mins);
print_r($remaining_array);
}
}
when i print the remaining array the ourput is two arrays