Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php -> =>

// The double arrow operator, =>, is used as an access mechanism for arrays.
$myArray = array(
    0 => 'Big',
    1 => 'Small',
    2 => 'Up',
    3 => 'Down'
);

// The object operator, ->, is used in object scope to access methods and properties of an object.
$obj = new MyObject(); // create a new instance of MyObject into $obj
$obj->thisProperty = 'Fred'; // set a property in the $obj object called thisProperty
$obj->getProperty(); // call a method of the $obj object named getProperty
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
4+3 =