variable of variable $$, ${ ...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cdt_sylvestre

    variable of variable $$, ${ ...

    hi,

    i m trying to find how to access a variable of variable (which is an image)
    i want to know the size of the picture
    the name of the picture is photo1
    next one is photo2, next one is photo3 ...


    for ($i=1;$i<$MAX_P HOTOS;$i++)
    {
    $photo='photo'. $i;
    $$photo_size; //don t work

    }


    thx



  • CountScubula

    #2
    Re: variable of variable $$, ${ ...

    "cdt_sylves tre" <cdtEffacercAsl y@relayeur.com> wrote in message
    news:3ff934d6$0 $17130$626a54ce @news.free.fr.. .[color=blue]
    > hi,
    >
    > i m trying to find how to access a variable of variable (which is an[/color]
    image)[color=blue]
    > i want to know the size of the picture
    > the name of the picture is photo1
    > next one is photo2, next one is photo3 ...
    >
    >
    > for ($i=1;$i<$MAX_P HOTOS;$i++)
    > {
    > $photo='photo'. $i;
    > $$photo_size; //don t work
    >
    > }[/color]

    I dont quite get where your comming from, I think a differnt language or oop
    (short for oops)

    a variable does not have properties, it is not an object as in VB, java, and
    others...

    try
    $photo = "photo$i"; // just a little cleaner
    $photo_size = filesize($photo ); // if your wanting file size

    --
    Mike Bradley
    http://www.gzentools.com -- free online php tools


    Comment

    • Savut

      #3
      Re: variable of variable $$, ${ ...

      Or getimagesize() if you need to know the width and height

      Savut

      "CountScubu la" <me@scantek.hot mail.com> wrote in message news:UMaKb.6498 $v97.1714@newss vr29.news.prodi gy.com...[color=blue]
      > "cdt_sylves tre" <cdtEffacercAsl y@relayeur.com> wrote in message
      > news:3ff934d6$0 $17130$626a54ce @news.free.fr.. .[color=green]
      > > hi,
      > >
      > > i m trying to find how to access a variable of variable (which is an[/color]
      > image)[color=green]
      > > i want to know the size of the picture
      > > the name of the picture is photo1
      > > next one is photo2, next one is photo3 ...
      > >
      > >
      > > for ($i=1;$i<$MAX_P HOTOS;$i++)
      > > {
      > > $photo='photo'. $i;
      > > $$photo_size; //don t work
      > >
      > > }[/color]
      >
      > I dont quite get where your comming from, I think a differnt language or oop
      > (short for oops)
      >
      > a variable does not have properties, it is not an object as in VB, java, and
      > others...
      >
      > try
      > $photo = "photo$i"; // just a little cleaner
      > $photo_size = filesize($photo ); // if your wanting file size
      >
      > --
      > Mike Bradley
      > http://www.gzentools.com -- free online php tools
      >
      >[/color]


      Comment

      Working...