Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php loop through obect

PHP By Wandering Weevil on Mar 8 2020
$person = new StdClass();
$person->name = "Ngbokoli";
$person->age = 31;
$person->nationnality = "Congolese";
$person->profession = "Student";

foreach ($person as $key => $value) {
    echo $key." ".$value."
";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #loop #obect
ADD COMMENT
Topic
Name
7+3 =