get a single value of array items in php

后端 未结 3 779
故里飘歌
故里飘歌 2021-01-22 09:18

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         


        
3条回答
  •  隐瞒了意图╮
    2021-01-22 09:59

    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);
    

提交回复
热议问题