note 3417 modified in function.compact by irc-html

From: Date: Sat, 19 Jan 2002 21:18:58 +0000
Subject: note 3417 modified in function.compact by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25492@lists.php.net to get a copy of this message
It should be noted that PHP will simply skip any strings that are not set: <?php $foo = 4; $bar = 3; $result = compact('foo', 'bar', 'baz'); ?> will result in: ('foo' => 4, 'bar' => 3) 'baz' is simply ignored. --was-- It should be noted that PHP will simply skip any strings that are not set: <PRE> &lt;?php $foo = 4; $bar = 3; $result = compact('foo', 'bar', 'baz'); ?> </PRE> will result in: ('foo' => 4, 'bar' => 3) 'baz' is simply ignored. http://www.php.net/manual/en/function.compact.php

« previous php.notes (#25492) next »