You are here: Re: storing classes « PHP Programming Language « IT news, forums, messages
Re: storing classes

Posted by Carl Vondrick on 01/24/06 21:40

You can "store" objects in an array, sure:

$my_array = array(new my_object(), new_my_object());

That should work just fine (untested).

You can also try and serialize objects, which are useful if you want to
save them after execution is over. To do this, you use serialize()and
unserialize(). For example:

fwrite($handle, serialize($myobject));

Then later on:

$a = unserialize(file_get_contents('serialized_code.php'));

Good luck.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация