Curly Braces Notation in PHP

前端 未结 3 1803
南笙
南笙 2020-12-01 11:10

I was reading source of OpenCart and I ran into such expression below. Could someone explain it to me:

$quote = $this->{\'model_shipping_\' . $result[\'co         


        
3条回答
  •  粉色の甜心
    2020-12-01 11:32

    Curly braces are used to explicitly specify the end of a variable name.

    https://stackoverflow.com/a/1147942/680578

    http://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex

提交回复
热议问题