Reputation: 83
I am trying to insert some PHP/HTML mix inside of a PHP variable.
$media = '<br>'date('F j, Y, g:i a', strtotime( $key['date'] ))'<br>';
But it doesn't work whatever i try. Any help appreciated.
Upvotes: 0
Views: 68
Reputation: 4826
to mix variables in php you must use .
(dot). for your question. you must do it like this:
$media = '<br>'.date('F j, Y, g:i a', strtotime( $key['date'] )).'<br>';
Upvotes: 3