Thursday, 1 August 2019

How to define an empty object in PHP?

<?php   
    $ObjAraay = new stdClass();
    $ObjAraay->fname = "PHP";
    $ObjAraay->lname = "Beginner";

    echo "<pre>";
    print_r($ObjAraay);
    echo "</pre>";
?>

Result: 


No comments:

Post a Comment