> > echo "$this->name[5]\n";
> > echo "$this->ID[5]\n";
> > $a1 = $this->name;
> > $a2 = $this->ID;
> > echo "\n$a1[5] $a2[5]\n";

use curly brackets to help PHP understand what you're after:

echo "{$this->name[5]}\n";

When you're in a string like this, PHP has a hard time knowing when
you're wanting to access a variable, and when you're simply trying to
output text.  Using curly brackets clears it up.

HTH,
John W

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to