Dethman Posted January 22, 2009 Share Posted January 22, 2009 I need to know how to do something like this? <?php for($i=1;$i <=15; $i++){ $var"".$i."" = "Hello World"; } ?> If you understand what im trying to do can you please help? If you dont understand, Im trying to get the $var to print out like this $var1 $var2 $var3 ... If you dont understand that, YOU FAIL PLEASE DIE - lol Thanx for any help, Brian Flores CEO, NimbusGames,llc Quote Link to comment https://forums.phpfreaks.com/topic/141896-adding-a-number-to-a-var-name/ Share on other sites More sharing options...
haku Posted January 22, 2009 Share Posted January 22, 2009 <?php for($i=1;$i <=15; $i++){ $var = 'var' . $i; $$var = "Hello World"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/141896-adding-a-number-to-a-var-name/#findComment-742981 Share on other sites More sharing options...
.josh Posted January 22, 2009 Share Posted January 22, 2009 Wow man, nice, strong company. Very professional website. Top level customer service. I'm impressed. For real. Can I have a job? Would it be okay to come in for an interview tomorrow some time? 8a cst good for you? We can go grab some breakfast and talk it over. I have a good feeling about you. We can work some sort of arrangement out. Just gimme a holler at my email address we'll discuss the fine print. Quote Link to comment https://forums.phpfreaks.com/topic/141896-adding-a-number-to-a-var-name/#findComment-742986 Share on other sites More sharing options...
Dethman Posted January 22, 2009 Author Share Posted January 22, 2009 Yeah sounds great ill have my executive department message you asap, I could always use an Extra pair of programing hands on staff, I'm still learning, just because I don't know everything there is to know does not mean I can not make a business for it I have employee's who do the work and I pay them well. And how could you see my website? My server is currently down for upgrades, it has been for a few days. Well I'm looking forward to that breakfast with you, i'll fly to where you are no need to come to me Ive seen you in action on these forums I really could use someone of your talent! Again Looking Forward to breakfast, Brian Flores CEO NimbusGames,llc Quote Link to comment https://forums.phpfreaks.com/topic/141896-adding-a-number-to-a-var-name/#findComment-743389 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.