Log 2227

$dateOfBirth = #תאריך לידה#;
$currentDate = date(‘d/m/Y’);

list($birthDay, $birthMonth, $birthYear) = explode(‘/’, $dateOfBirth);
list($currentDay, $currentMonth, $currentYear) = explode(‘/’, $currentDate);

$age = $currentYear – $birthYear;

if ($currentMonth < $birthMonth || ($currentMonth == $birthMonth && $currentDay < $birthDay)) {
$age–;
}

return "My age is: " . abs($age);

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
  • Attributes
  • Custom attributes
  • Custom fields
Click outside to hide the comparison bar
Compare