php go through object code example

Example: php loop through object

$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}$person = new StdClass();
$person->name = "Taylor";
$person->age = 31;

foreach ($person as $key => $value) {
    echo $key.",".$value."\n";
}

Tags:

Php Example