-1

This aray echos custom atribute for 'subscription-end'. This echos a date set. Where am i going wrong?

<?php
$u = new User();
if($u->isLoggedIn()) {
$ui = UserInfo::getByID($u->getUserID());
echo $ui->getAttribute('subscription_end');
foreach ($valeus as $date) {
echo $date ('l d F Y  ');
}}
?>
NKJ Bolt
  • 3
  • 2

1 Answers1

1

You use the variable $date as a function, that's why you get the error about an undefined function.

echo date ('l d F Y  ', $date);

is correct if your dates are in unix timestamp format.

Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121