Posted by Etienne Marais on 12/04/05 04:54
Peter van Schie wrote:
> Nitrous wrote:
>> Thanks Peter
>> In this case that will probably work... I'll try.
>> But my question really is about trying to
>> "concatenate" $general_image to $i to achieve the variable name
>> $general_image1
>>
>> Any thoughts on this.
>
> Oh, you mean like this?
>
> <?php
> for($i=1; $i<4; $i++)
> {
> if (${"general_image".$i} != " ")
> {
> // blah blah...
> }
> }
> ?>
>
Cool, I have allways used
"variable variables" in
such scenarios i.e. :
..
..
..
$varname="general_image".$i;
if ($$varname!=" ") {
// blah blah...
}
..
..
..
--
Etienne Marais
Cosmic Link
South Africa
Navigation:
[Reply to this message]
|