Reply to Re: another parsing problem...

Your name:

Reply:


Posted by AnrDaemon on 11/11/07 11:25

Greetings, otrWalter@gmail.com.
In reply to Your message dated Friday, November 9, 2007, 19:55:46,

> I'm trying to display that type, name and value to class properties.
> Yes, I know about print_r().

> I'm just trying to build a display format for this information. AFAIK,
> the standard PHP tools to look into classes do not give you PRIVATE
> and PROTECTED properties (nor methods), but the print_r() does! (At
> least for properties it does.)

> This this display below...

> // [this is a stored in a string variable]
> Vegetable Object
> (
> [edible:private] => spinach
> [color:protected] => green
> [size] => 1
> )

> Now, I'd like to parse this string (above) into 3 arrays:
> 1) Public
> 2) Private
> 3) Protected

> Each having a list of variables names with their values, as so...

> array
> (
> [private] => ([edible] => spinach),
> [protected] => ([color] => green),
> [public] => ([size] => 1)
> }

> Any ideas?

$c = print_r($object, true);

Then work over $c.


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

[Back to original 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

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