Page 1 of 1
Storing 1 field as opposed to an array..
Posted: Sat Jul 28, 2012 12:05 pm
by orbdrums
I have the following code that stores an array to a variable:
$user_desc = $row4'[img_desc'];
How would I just store "img_desc" from the current record in a while loop? Would it be:
$user_desc = $row4'img_desc';
Thanks in advance for any help.
Re: Storing 1 field as opposed to an array..
Posted: Sat Jul 28, 2012 4:31 pm
by social_experiment
orbdrums wrote:I have the following code that stores an array to a variable:
$user_desc = $row4'[img_desc'];
How would I just store "img_desc" from the current record in a while loop? Would it be:
$user_desc = $row4'img_desc';
Thanks in advance for any help.
Do you only want to store the string "img_desc" in $user_desc?
Re: Storing 1 field as opposed to an array..
Posted: Sat Jul 28, 2012 6:22 pm
by orbdrums
Yes. I only want to store 1 record's field from an array. So $row4['img_desc'] may have more than 1 result but I want to create a variable that contains only 1 result depending on a condition.