faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

25 of 148 people (17%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Does PHP support document objects (similar to javascript)

Feb 18th, 2008 19:24
dman, Pavel Prishivalko, Peter Boritz, http://www.ttnr.org


The answer is:
No.
But you can write your own classes and use them. Of cource, PHP isn't
Java :( - OOP in PHP is simple but powerful. :)
Also you can use a couple of built-in classes (like directory class and
so on...)
Cheers
If you are looking to parse an HTML document into nodes, you might wanna
have a look at the php DOM extension, it is not exactly like document
object in javascript, but it can help you parse an HTML document into a
tree of element nodes