I have an array in my php code, but I don\'t know how to get the value of it.
my array :
$year = array(
\'data\' => to_html(strtr(to_lang(\'main
This should work: $stringyear = $year['data']['^year'];
You are able to access it as follows:
$stringyear = $year[1]['^year'];
It depends on what to_html
function returns, If it returns a string (for displaying in html), then you can not get it (You can but you need to parse the string again).
Since you have the $timestamp
, why not just do with:
$stringyear = date('Y', $timestamp);