Jump to content

What am i doing wrong here


Recommended Posts

hey i have the following script

Global $data1=45
Global $data2=400
Global $PRICE[$data1][$data2][3]

now i do all kind of staff in the script and in the end i want to do something like this
Global $PRICE[$data1][$data2][0] = $whatever0
Global $PRICE[$data1][$data2][1] = $whatever1
Global $PRICE[$data1][$data2][2] = $whatever2

but i get this error

Subscript used with non-Array variable.:

an i missing something here?

thanks

Link to comment
Share on other sites

In other words your array can't have 45 and 400 as the numbers, you'll have to do $data1 - 1 and $data2 - 1

Global $PRICE[$data1-1][$data2-1][0] = $whatever0
Global $PRICE[$data1-1][$data2-1][1] = $whatever1
Global $PRICE[$data1-1][$data2-1][2] = $whatever2

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...