I have four arrays that I get from the database unserialize inside a loop, and than get a single value from a loop inside this loop :) Code below:
<?php
// MONTH
$eduGraduationDateMonth = get_post_custom_values('rbeduendmonth');
// YEAR
$eduGraduationDateYear = get_post_custom_values('rbeduendyear');
// PLACE
$eduPlace = get_post_custom_values('rbeduplace');
// FACULTY
$eduFaculty = get_post_custom_values('rbedusubject');
foreach($eduGraduationDateMonth as $eduMonthValue){
$eduMonthUnser = unserialize($eduMonthValue);
foreach($eduMonthUnser as $eduMonthUnserValue){
echo $eduMonthUnserValue;
}
}
foreach($eduGraduationDateYear as $eduYearValue){
$eduYearUnser = unserialize($eduYearValue);
foreach($eduYearUnser as $eduYearUnserValue){
echo $eduYearUnserValue;
}
}
foreach($eduPlace as $eduPlaceValue){
$eduPlaceUnser = unserialize($eduPlaceValue);
foreach($eduPlaceUnser as $eduPlaceUnserValue){
echo $eduPlaceUnserValue;
}
}
foreach($eduFaculty as $eduFacultyValue){
$eduFacultyUnser = unserialize($eduFacultyValue);
foreach($eduFacultyUnser as $eduFacultyUnserValue){
echo $eduFacultyUnserValue;
}
}
?>
Of course when i echo it i get something like: mayseptember19901996College NameAnother CollegeITWriter
What I need is to loop it somehow so i can get the following:
May 1990
College Name
IT
September 1996
Another College
Writer
How could I do that?
Thank you!