use an array from 1 class in a second class


Posted on 16th Feb 2014 07:03 pm by admin

I have a class that adds data to an array

Then I have a second class and I need to check if the data it returns is in the array created in the first class.
But I get undefined variable: Array name

Basically the array is empty outside of the first class.

Is it possible to use that array between classes?

No comments posted yet

Your Answer:

Login to answer
187 Like 49 Dislike
Previous forums Next forums
Other forums

C problem struct and string
Hi guys,

This is my first post and I'm hoping the experts here can help me solve my problem.<

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

array_diff weirdness
I'm using the following bit of code

$diff = array_diff($pids, $pidlist);
$diff = array_va

LSB (PHP 5.3) problem with static value!
hello,

i'm having a problem. static::$text variable gets lost at some point. can someone plea

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

Checking if field is empty AND using !is_numeric
Hi lads,

Need to be able to display an error message (using isset?) that says "Cant lea

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

Pspell with my own dictionary
Hello!
I've tested two cases using pspell functions.
1)
Code: $dictionary_link = pspell_new

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash