Jump to Navigation

205 - PHP Meaning -> & =>

  • -> To create a new object, use the new statement to instantiate a class.
<?php
class foo
{
    function do_foo()
    {
        echo "Execute do_foo function in class foo";
    }
}

$bar = new foo;
$bar->do_foo();
?>

You can execute a method in a class object.

  • => Assign the value to the array

    $login_params = array("next_url" => "/home.pl", "email" => $email,
    "password" => $password);

//This means :

    $login_params = array();
    $login_params["next_url"] = "/home.pl";
    $login_params["email"] = $email;
    $login_params["password"] = $password;

 

PHP:


Main menu 2

Story | by Dr. Radut