I get an array from the following code
$classes = $mb->makeNumericArray($data['GetClassesResult']['Classes']['Class']);
$result = $classes;
echo '<pre>';
print_r($result);
echo '</pre>';
and array
Array
(
[0] => Array
(
[ClassScheduleID] =>
[ClassDescription] => Array
(
[Description] =>
[Program] => Array
(
[ScheduleType] => DropIn
)
)
[Staff] => Array
(
[SortOrder] =>
}
)
[1] => Array
(
[ClassScheduleID] =>
[ClassDescription] => Array
(
[Description] =>
[Program] => Array
(
[ScheduleType] => DropIn
)
)
[Staff] => Array
(
[SortOrder] =>
}
)
)
I tried to extract the code with reference to this qaru.site/questions/1579064 / ... ,
foreach($result as $res)
{
$classscheduleid= $res['ClassScheduleID'];
echo $classscheduleid;
}
I have currently tried this code to print ClassScheduleID.
But it does not retrieve data correctly. It skips the values in [0], and in the rest of the array, it repeats the result.
Can someone tell me how I can get ClassScheduleIDalong with Description, ScheduleTypeand sortorderfrom a full array?
source
share