You are here: ACCESS VALUES WITHIN CLASS WITHIN AN ARRAY « PHP Programming Language « IT news, forums, messages
ACCESS VALUES WITHIN CLASS WITHIN AN ARRAY

Posted by Shawn Hamzee on 06/21/06 15:26

I have the following construct (printed with print_r):

Array
(
[0]=> Classes Object
(
[_my_id] => 001
[_my_name] => John
)
[1]=> Classes Object
(
[_my_id] => 003
[_my_name] => Jill
)
)

What is the syntax to access _my_id and _my_name in for loop.

I have this but it doesn't work:
-for ($I = 0; $I < count($myarrays_name); $I++) {
print $myarrays_name[$I]=>Classes->_my_id
}

Thanks for the help.

 

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

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