note 18781 modified in ref.array by hholzgra

From: Date: Sat, 02 Mar 2002 18:06:04 +0000
Subject: note 18781 modified in ref.array by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-27271@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 three 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 (#27271) next »