Re: Missing arguments for function in class? (object-oriented programming)
| From: | Markus Fischer | Date: | Thu, 28 Jun 2001 01:28:11 +0000 |
| Subject: | Re: Missing arguments for function in class? (object-oriented programming) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55447@lists.php.net to get a copy of this message | ||
On Wed, Jun 27, 2001 at 07:26:53AM -0600, Thomas David Kehoe wrote :
[...]
> $my_records = new Display_Records;
[...]
> <?php
>
> class Display_Records {
>
> function display_records($row, $record_count) {
The constructor of your class assumes two parameters;
you're creating an instance without passing those values.
$my_records = new Display_Records( $param1, $param2);
is the proper syntax.
- Markus