date - PHP datetime formatting in echo -


php noob. having trouble getting php date format execute here:

echo "<div class='column'>";  echo $row['date'];  echo "</div>";  

i tried below no luck.

echo ".date('d/m/y', strtotime($row['date']))"; 

it should be

echo date('d/m/y', strtotime($row['date'])); 

the problem is

echo ".date('d/m/y', strtotime($row['date']))";       ^............  $date = '2014-01-31'; echo ".date('d/m/y', strtotime($date))"; 

the output .date('d/m/y', strtotime(2014-01-31))

it treat string except variable inside "".


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -