Jump to content

[SOLVED] Put a variable in another variable somehow?


anolan13

Recommended Posts

Hello,

 

For awhile now I've used code to get the size of a folders content (folder "files") on my server, this is the line that is now causing me trouble...

 

$total = total_size('files/');

 

But now I want that folder to be a variable instead so maybe the folder is named "files" or "dogs" or "oranges" or anything...so I picture the new line of code being something like this

 

$total = total_size('$files/');

 

Where $files is a variable, but it just wont work. I've tried everything, removing the ' 's ... the / I've played around with it for a long time and I get nothing.

 

So how do I make this work?

 

Any help is greatly appreciated,

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.