A basic idea, how it can be done,
PHP PART
$months = array(
"Jan" => array(
"01" => "Aquarius",
"02" => "Aquarius",
),
"Feb" => array(
"01" => "Gemini",
"02" => "Gemini",
)
);
JS PART
<script type="text/javascript">
$( document ).ready(function()
{
var months_json = <?php echo json_encode($months);?>;
console.log(months_json);
for( m in months_json){
//console.log(m);
$('#m_sb').append('<option>'+m+'</option>');
}
$("#m_sb, #d_sb").on('change',function(){
var month = $('#m_sb option:selected').text();
var date = $('#d_sb option:selected').text();
//console.log(date+month);
$.each(months_json, function(k,v){
if(k == $('#m_sb option:selected').text()){
$.each(v, function(i,j){
if(i == $('#d_sb option:selected').text())
alert(j);
});
}
});
});
});
</script>
<select name='months' id='m_sb'>
</select>
<select name='dates' id='d_sb'>
<option>01</option>
<option>02</option>
</select>
echo $months[$_POST['month']][$_POST['day']];?