![]() |
How to save the array vars in a class?
Hi,
I'm using serialize to save an object which worked until I started using Arrays in the class. Please see this code below: :
class Base extends TileThen you would just call serialize and unserialize. But like I commented that doesn't work, the array is not saved. Any suggestions what could I try? Thanks. |
Can you show your serialize and deserialize code? I have never heard of problems with those functions working with arrays, and the code you have shown me does necessairly indicate anything I would see as an error--yet.
|
Sure kurifu, thanks for looking into this!
first the $map is initialized like this: $map = array(); and filled with new Tile() this is how the map is saved: :
this is how it's loaded: :
And here are the functions used: :
The problem should not be in the session code I think because everything else works except the array saving. Thank you, please understand that I am a beginner at php and more of an C++ coder so please feel free to comment the code, it would help me. |
| All times are GMT -5. The time now is 12:49 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC