note 24108 added to function.crypt

From: Date: Tue, 06 Aug 2002 22:30:10 +0000
Subject: note 24108 added to function.crypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-34429@lists.php.net to get a copy of this message
Respect to the coment of marcin@jackowski.net, don't forget that using variable names inside double quotes causes them to be parsed, but inside single quotes variable names are not parsed, so what you're really passing to crypt in the first case is the contents of $1 followed by the contents of $somesalt, which probably are variables that do not exist and are parsed as empty variables. But in the second place, you pass $1$somesalt, not the contents of the variables. That's why it doesn't work. As joao.correia@valnetsado.pt said, it can be solved with a simple backslash before the $ inside double quotes. -- http://www.php.net/manual/en/function.crypt.php http://master.php.net/manage/user-notes.php?action=edit+24108 http://master.php.net/manage/user-notes.php?action=delete+24108 http://master.php.net/manage/user-notes.php?action=reject+24108

« previous php.notes (#34429) next »