Parsing help
Question :-
PHP Code:
So what i want is to parse the above line , and grab all the data in a dynamic array . Problem is amount of argument in the line is unidentified . It can be PHP Code:
|
Re: Parsing help
You need to lay out some type of rules for this data ie. some consistent ordering, or prefix each data item with an identifier POWER-powervalue CLASS-theclass. A computer can only do what you tell it to do, there's no magic way for it to know what you're trying to accomplish.
Looking at your second example, are the types of arguments dynamic, or only the data items belonging to each type dynamic? If you wanted to do like "100 1 55 AWP GLOCK HEGRENADE" (100=power, 1=class, 55=ability, then a list of weapons) then this is simple. Give some real-life example datas so we can better understand what needs to be parsed. |
Re: Parsing help
What Bugsy said.
You didn't tell us what you want to do, but if you just want to push mixed data into a dynamic array, why not just use ArrayPushArray / ArrayGetArray? PHP Code:
|
Re: Parsing help
Any ways i figured it out myself.
Note - i used "!" to differentiate the arguments PHP Code:
|
Re: Parsing help
Glad to see you took the time to read my post.
|
| All times are GMT -4. The time now is 09:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.