Raised This Month: $ Target: $400
 0% 

[HELP] Assign constants to an arrays of variable


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-11-2014 , 06:12   [HELP] Assign constants to an arrays of variable
Reply With Quote #1

Hey, guys! I don't know if my termins are right, but I guess so. Now on the problem. Let's say I have three constants - const1, const2 and const3. And I want to assing them to arrays in one variable. Like the first array of the var should be equal to the first const, the second array to be equal to second const and etc. I don't even know if that's possible, but if it is, I would want to know the way. Let me show you what I've tried:
PHP Code:
new const1[][] = {"""Something1"}
new 
const2[][] = {"""Something2"}
new 
const3[][] = {"""Something3"}

//...//
new Consts[3]
Consts[0] = const1
Consts
[1] = const2
Consts
[2] = const3 
But I get error - Must be assigned to an array. Only when I add an index to the const, like a num from it, it's all right. I know, that it should be equal to something, when it's variable, but I want the variable's array to be equal just to the const name. Tried with defines, but it's too far hardcoding - maany errors. Any ideas?
__________________

Last edited by Flick3rR; 06-11-2014 at 06:56.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode