View Single Post
Old 06-27-2009, 01:51 PM   #1 (permalink)
tech
The Wanderer
 
Join Date: Jun 2009
Posts: 20
Thanks: 2
tech is on a distinguished road
Default how to get the last child in an array and set last child to it.

dear all
In python we can write to get lastchild's last child in contents array and set lastchild to it.
lastChild = lastChild.contents[-1]

but in php

$lastChild=end($lastChild->contents);
//is it proper way to do same thing or any better way.

thanks
tech is offline  
Reply With Quote