note 47180 deleted from function.print by sobak

From: Date: Sat, 10 Dec 2016 23:17:07 +0000
Subject: note 47180 deleted from function.print by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208460@lists.php.net to get a copy of this message
Note Submitter: gem at rellim dot com ---- HERE Documents can reference arrays as long as you enclose the vars in {}. Like this: <?php $line = array( 'title' => "Hello", 'date' => 'Today'); echo <<<EOT Title: {$line['title']} Date: {$line['date']} EOT; ?> Run this and get Title: Hello Date: Today More info here, scroll down to "heredoc syntax": http://www.php.net/manual/en/language.types.string.php

« previous php.notes (#208460) next »