#20740 [Opn->Bgs]: unable to use a variable from an array when creating function

From: Date: Sat, 30 Nov 2002 23:00:36 +0000
Subject: #20740 [Opn->Bgs]: unable to use a variable from an array when creating function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26257@lists.php.net to get a copy of this message
ID: 20740 Updated by: derick@php.net Reported By: matt@mattd.org -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: RedHat Linux 8.0 PHP Version: 4.2.2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2002-11-30 16:57:30] matt@mattd.org Hi when calling a function: $restricted = check_restriction($row_person['restriction_code']); I run into a problem. The function is defined as: function check_restriction($row_person['restriction_code'] ) It would appear that i can't use the array variable $row_person['restriction_code'] in this definition. the error message: "Parse error: parse error, unexpected '[', expecting ')'" When creating a seperate variable from this array, it works fine... Thanks ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20740&edit=1

« previous php.bugs (#26257) next »