I have two string like below.
How do I get difference between them in PHP?
I tried code below
<?php echo date_diff(date_create($experience[$i]->StartWork),date_create($experience[$i]->EndWork))->format("%a days"); ?>
I have two string like below.
How do I get difference between them in PHP?
I tried code below
<?php echo date_diff(date_create($experience[$i]->StartWork),date_create($experience[$i]->EndWork))->format("%a days"); ?>
You can simply do this
Demo : : https://eval.in/852242