By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,657 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Where are my values?!

P: n/a
No - this isn't a morality question. :)

When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing it.

What am I doing wrong?!
Jul 25 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
..oO(Sanders Kaufman)
>No - this isn't a morality question. :)
There's not even a constructor ... SCNR ;)
>When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing it.
Do you have error_reporting set to E_ALL? PHP should give you a notice.

$this->RecordSet
$this->Recordset

See the difference?

Micha
Jul 25 '07 #2

P: n/a
Sanders Kaufman wrote:
No - this isn't a morality question. :)

When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing
it.

What am I doing wrong?!
Case sensitivity.

$this->RecordSet[0]

is not the same as

$this->Recordset[0]

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
Jul 25 '07 #3

P: n/a
Michael Fesser wrote:
.oO(Sanders Kaufman)
>No - this isn't a morality question. :)

There's not even a constructor ... SCNR ;)
>When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing it.

Do you have error_reporting set to E_ALL? PHP should give you a notice.

$this->RecordSet
$this->Recordset

See the difference?
Oh, for crying out loud!
I knew it was something stupid.
Thanks.
Jul 25 '07 #4

P: n/a
Sanders Kaufman wrote:
But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
Are you sure the keys are exactly right? Sure it's not something like...

$this->Recordset[0]["username "]

??

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 35 days, 1:40.]

Cryptography Challenge
http://tobyinkster.co.uk/blog/2007/0...pto-challenge/
Jul 25 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.