note 45873 deleted from language.variables.external by tomsommer

From: Date: Wed, 22 Sep 2004 19:29:31 +0000
Subject: note 45873 deleted from language.variables.external by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77177@lists.php.net to get a copy of this message
Note Submitter: dogshxttaco at hotmail dot com ---- I'm going way back in time here, but this is something useful for lots of people new to php. So, replying to steiner277 at charter dot net from two years ago :D This will work: $msg = "The message is:\t" . $_POST['message'] . "\n"; This won't work: $msg = "The message is:\t$_POST['message']\n"; This will work: $msg = "The message is:\t{$_POST['message']}\n"; The superglobal vars are arrays, so like any other array, using them inside double quotes is not the same as using a 'normal' variable. So if you're putting the array var into the double quotes, don't forget your curly braces. :)

« previous php.notes (#77177) next »