Forum Moderators: coopster

Message Too Old, No Replies

Referencing Row Column With Variable

Simple? But I Just Can't Getit to work...

         

theriddla1019

8:33 pm on Oct 25, 2004 (gmt 0)

10+ Year Member



$total = $type . "frequency";
$freq = $Row[$total];

this obviously isnt the right way to do it because i can manually input 'ptfrequency' and it works but building the variable also gives 'ptfrequency' so im guessing the "grabbing the row with a variable" syntax is incorrect.
Ive tried..

$freq = $Row['$total'];
and
$freq = $Row["$total"];

also with no results.

Help me! :)
Adam

theriddla1019

8:39 pm on Oct 25, 2004 (gmt 0)

10+ Year Member



NM...i always figure this stuff out as soon as i post... "$type" was all uppercase so it was giving
PTfrequency not ptfrequency so i did the
$type = strtolower($type);
and it works..
Cheers :)