我的问题是我有这个数组:
$stockImages = [
[
'name' => $large,
'type' => 'large',
'resolution' => $w.'x'.$h,
'size' => $lSize
]
]
我想得到这个值$ wi尝试过
{{$stockImages[1]->resolution($w)}}
但这没用
您变得太复杂了,请尝试以下操作:
$stockImages = [[
'name' => $large,
'type' => 'large',
'resolution' =>
[
'w' => $w,
'x' => $h
],
'size' => $lSize
]];
完成后,按以下方式访问宽度:
$stockImages[0]['resolution']['w'];
再见<3
http://sandbox.onlinephpfunctions.com/code/cd60316ace8e386a9e49b22bf95aa7123605b92e
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句