note 18781 modified in ref.array by maxim

From: Date: Tue, 12 Nov 2002 16:02:59 +0000
Subject: note 18781 modified in ref.array by maxim
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-39380@lists.php.net to get a copy of this message
To display the value of a variable from a two dimentional array inside a quoted string, use the following syntax: <?php $var = array( 'name' => array( 'first' => 'Caleb', 'last' => 'Maclennan' ) ); echo "My first name is {$var['name']['first']}!"; ?> --was-- To display the value of a variable from a two dimentional array inside a quoted string, use the following syntax: <?php $var = array( 'name' => array( 'first' => 'Caleb', 'last' => 'Maclennan' ) ); echo "My first name is {$var[name][first]}!"; ?> http://www.php.net/manual/en/ref.array.php

« previous php.notes (#39380) next »