Adding two arrays
How is it possible to add two arrays and to compare the result in an "if" clause, without getting the "array must be indexed" error?
Example: A command that stores a score into an array (with read_argv) then the sum of two arrays must be compare with an integer. |
Re: Adding two arrays
You can use str_to_num().
str_to_num( MyArray1 ) + str_to_num( MyArray2 ) But provide a full exemple which cause you some problems. |
Re: Adding two arrays
Ah yeah, works. Thnx for the info.
|
| All times are GMT -4. The time now is 05:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.