laravel code

laravel code


Convert birth date to words in PHP

Convert birth date to words in PHP

Example : date of birth in words converter

How To Convert Date Of Birth In Words In Php. In the following code, date(), date_create(), and date_diff() functions are used to calculate age of the user till today in php. Calculate age based on date of birth using jquery datepicker. Echo <p align='center' style='color:blue'>$birth_day $monthname. I want to convert their date of birth to their age (years only), e.g. 14 and 15.03.2014 will calculate and returns age based on the date provided by the user.

function numberTowords($num)

$ones = array(
0 =>"ZERO", 
1 => "ONE", 
2 => "TWO", 
3 => "THREE", 
4 => "FOUR", 
5 => "FIVE", 
6 => "SIX", 
7 => "SEVEN", 
8 => "EIGHT", 
9 => "NINE",
10 => "TEN", 
11 => "ELEVEN", 
12 => "TWELVE", 
13 => "THIRTEEN", 
14 => "FOURTEEN", 
15 => "FIFTEEN", 
16 => "SIXTEEN", 
17 => "SEVENTEEN", 
18 => "EIGHTEEN", 
19 => "NINETEEN",
"014" => "FOURTEEN" 
$tens = array( 
0 => "ZERO",
1 => "TEN",
2 => "TWENTY", 
3 => "THIRTY", 
4 => "FORTY", 
5 => "FIFTY", 
6 => "SIXTY", 
7 => "SEVENTY", 
8 => "EIGHTY", 
9 => "NINETY" 
$hundreds = array( 
); /* limit t quadrillion */
$num = number_format($num,2,".",",");
$num_arr = explode(".",$num); 
$wholenum = $num_arr[0]; 
$decnum = $num_arr[1]; 
$whole_arr = array_reverse(explode(",",$wholenum)); 
$rettxt = ""; 
foreach($whole_arr as $key => $i){
if($i < 20){ 
/* echo "getting:".$i; */
$rettxt .= $ones[$i]; 
}elseif($i < 100){ 
if(substr($i,0,1)!="0")  $rettxt .= $tens[substr($i,0,1)]; 
if(substr($i,1,1)!="0") $rettxt .= " ".$ones[substr($i,1,1)]; 
if(substr($i,0,1)!="0") $rettxt .= $ones[substr($i,0,1)]." ".$hundreds[0]; 
if(substr($i,1,1)!="0")$rettxt .= " ".$tens[substr($i,1,1)]; 
if(substr($i,2,1)!="0")$rettxt .= " ".$ones[substr($i,2,1)]; 
if($key > 0){ 
$rettxt .= " ".$hundreds[$key]." "; 
if($decnum > 0){ 
$rettxt .= " and "; 
if($decnum < 20){ 
$rettxt .= $ones[$decnum]; 
}elseif($decnum < 100){ 
$rettxt .= $tens[substr($decnum,0,1)]; 
$rettxt .= " ".$ones[substr($decnum,1,1)]; 
return $rettxt; 

$birth_date = $_POST[birth_date];
$new_birth_date = explode('-', $birth_date);
$year = $new_birth_date[0];
$month = $new_birth_date[1];
$day  = $new_birth_date[2];
$monthNum = $month;
$dateObj = DateTime::createFromFormat('!m', $monthNum);//Convert the number into month name
$monthName = strtoupper($dateObj->format('F'));
echo "<p align='center' style='color:blue'>$birth_day $monthName $birth_year</p>";
<!DOCTYPE html>
		<title>Conver Birth date to Words in PHP</title>
		<form method="post">
			<table border="0" align="center">
				<td>Enter Your Numbers</td>
				<Td><input type="text" name="birth_date" /></Td>
				<td colspan="2" align="center">
				<input type="submit"  name="convert"/>


I Want To Convert Their Date Of Birth To Their Age (Years Only), E.G.

you can also compare dates in php using comparison operators. I am a big fan of php, javascript, jquery, laravel, codeigniter, vuejs, angularjs and bootstrap from the early stage. This can come in handy every now and then. How to connect mysql databases to This article for those who wants to get age from date of birth. Nepali date converter (miti pariwartan tool) converts nepali (bikram sambat, bs) date to english (gregorian date, ad) and vice versa.


What is GEEK

Buddha Community

Hire PHP Developer

Looking to develop a PHP based website from scratch or revamp your existing website? has always been an industry leader for companies and business owners looking to hire PHP web developer. By choosing to Hire PHP Developer from our company, you can always expect the best results. Our PHP services and solutions are always flexible which means that no matter the nature of your project, you can always count on us for getting the best PHP expertise.

Consult with our experts:

#hire php developer #php developer #php development company #php development services #php development #php

Hire PHP Developer - Best PHP Web Frameworks for Web Development

A framework that can drastically cut down the requirement to write original code to develop the web apps as per your requirement is PHP Framework. PHP frameworks offer code libraries for commonly used functions to reduce the development time.

Want to use PHP Web Frameworks for your web applications?

WebClues Infotech offers a service to hire dedicated PHP developers for all of the below-mentioned frameworks

  • Laravel Developer
  • Codeigniter Developer
  • Yii Developer
  • Zend Developer
  • Cake PHP Developer
  • Core PHP Developer

Not sure which framework to use for your PHP web application?

Contact us

Schedule Interview with PHP Developer


#hire php developer #hire php web developers #hire php developer in 2021 #hire php developers & dedicated php programmers #hire php developers india #hire and outsource freelance php developers

Mariya James

Mariya James


Top PHP web development company| PHP development services India

ValueCoders is a leading PHP app development company that focuses on building robust, secure & scalable web applications for start-ups, enterprises, and entrepreneurs.

We have 16+ years of experience and have delivered custom PHP web development solutions to 2500+ global clients catering industry verticals, including healthcare, adtech, eLearning, data analysis, Fintech, eCommerce, etc

Are you planning to outsource PHP development services? Or want to hire an offshore PHP development team?

#hire php developer #hire a php developer in india #hire dedicated php programmers #hire php coders #php developer in india #php developers for hire

Hire Dedicated PHP Developer

Looking to hire affordable yet experienced PHP developers?

Hire Dedicated PHP Developer, who can convert your idea to reality, within the stipulated time frame. expertise & experience as the top PHP development company put us above our competitors, in many ways. We have some of the top PHP developers in the industry, which can create anything you can imagine, that too, at the most competitive prices.

Consult with our experts:-

#hire dedicated php developer #php developers #php development company #php development services #php development #php developer

Custom PHP Development Company | PHP Web Development Service

One programming language that has its root in Website development even at present is PHP Website Development. The PHP programming is executed on the server side which means it functions on web servers which helps the website in its performance.

Want to develop a website on PHP?

WebClues Infotech with its years of experience in Web Development helps individuals and businesses in launching a business website on PHP. The experienced development team with more than 20 years of experience is the solution to your every web development needs.

Want to know more about PHP website development?


Share your requirements

View Portfolio

#custom php development company #php web development service #php development services #php web development company india #php development services #hire php developers