More efficient way of listitem.
#1

Hello, I was wondering if there is any easyer/better way to do the following:

PHP код:
 if(listitem == 0)
                        {
                            
format(filesizeof(file), "Data/Reports/r0.ini");
                        }
                        if(
listitem == 1)
                        {
                            
format(filesizeof(file), "Data/Reports/r1.ini");
                        }
                        if(
listitem == 2)
                        {
                            
format(filesizeof(file), "Data/Reports/r2.ini");
                        } 
I did try:
PHP код:
format(filesizeof(file), "Data/Reports/r%d.ini"listitem); 
But sadly that doesn't work. Any other way to this?
Reply


Messages In This Thread
More efficient way of listitem. - by jasperschellekens - 06.01.2018, 09:12
Re: More efficient way of listitem. - by rfr - 06.01.2018, 09:16
Re: More efficient way of listitem. - by Jaxson - 06.01.2018, 09:21
Re: More efficient way of listitem. - by jasperschellekens - 06.01.2018, 09:22
Re: More efficient way of listitem. - by Kane - 06.01.2018, 09:34
Re: More efficient way of listitem. - by jasperschellekens - 06.01.2018, 09:37
Re: More efficient way of listitem. - by Kane - 06.01.2018, 09:38
Re: More efficient way of listitem. - by jasperschellekens - 06.01.2018, 09:53
Re: More efficient way of listitem. - by adri1 - 06.01.2018, 10:10
Re: More efficient way of listitem. - by jasperschellekens - 06.01.2018, 10:42

Forum Jump:


Users browsing this thread: 1 Guest(s)