Date List Static Array with PHP Function Drop Down :
Date list static array can help you to design contact form in offline mood. With this code, you can add dates in your form without using API system.
<?php
$date = array(
'1'=>'1',
'2'=>'2',
'3'=>'3',
'4'=>'4',
'5'=>'5',
'6'=>'6',
'7'=>'7',
'8'=>'8',
'9'=>'9',
'10'=>'10',
'11'=>'11',
'12'=>'12',
'13'=>'13',
'14'=>'14',
'15'=>'15',
'16'=>'16',
'17'=>'17',
'18'=>'18',
'19'=>'19',
'20'=>'20',
'21'=>'21',
'22'=>'22',
'23'=>'23',
'24'=>'24',
'25'=>'25',
'26'=>'26',
'27'=>'27',
'28'=>'28',
'29'=>'29',
'30'=>'30',
'31'=>'31');
?>
<html lang="us-en" xml:lang="us-en">
<head>
<style>
.form{
margin:10px auto;
}
.form label, select{
display:inline-block;
float:left;
}
.form label{
width:75px;
}
.body{
width:250px;
height:50px;
background-color:#C33;
padding:20 20 20 20;
margin:300px auto;
}
</style>
</head>
<body>
<div class="body">
<form class="form">
<div><label for="dates"><b>date:</b></label></div>
<div><select name="date" id="dates">
<?php
foreach($date as $dates => $datenow)
{
echo'<option value="'.$dates.'">'.$datenow.'</option>';
}
?>
</select>
</div>
</form>
</div>
</body>
</html>
Post a Comment
Give your reviews about this blog. Leave your comments. What do you think about this post?
Comments Guidelines:
1) I love to read comments, but please avoid spam.
2) Like this blog, share your insights, and spread the word.
3) You can use basic HTML/xHTML tags.
4) All comments are DoFollow—please use the section professionally.
5) Kindly mention your name or brand below your comment.
6) Constructive suggestions for improvement are always welcome.
7) Do not forget to explore our main agency platform at pingbooster.site.
Thanks for visiting Samee Articles.
========================================
Explore custom digital solutions and WordPress plugins at PingBooster Plugins.
Best Regards,
Samee U. Feroz