|
Posted by Benjamin on 05/17/07 02:50
On May 16, 3:55 pm, planetbr...@gmail.com wrote:
> I have read through php.net manuals and have not see any mention about
> what these operands actually do. I have seen them used in a bunch of
> different code lately and don't really understand.
>
> Example 1:
>
> // Legacy Function: Renders the Footer of the Theme
> function themefooter() {
> global $engine, $index, $themepath;
>
> if ($index != 3) {
> $engine->do_themefooter($index);
> }
>
> }
The -> return the attribute or calls the methods of an object The
above example calls the do_themefooter() method of whatever class
$engine is.
>
> Example 2:
>
> // get the color scheme
> $colors = pnModAPIFunc('Xanthia','user','getSkinColors',
> array('skinid' => $skinID,
> 'paletteid' => $paletteid));
That's an array. The => means the the string on the right side (the
key) refers to the value on the left. You could access the value of
$skinID, for example like this:
$colors['skinid']
>
> If anyone can shed some light on this, it would be greatly
> appreciated.
>
> thanks,
> brett.
Navigation:
[Reply to this message]
|