0
array(2) { 
[0]=> object(stdClass)#460 (1) { ["deskripsi"]=> string(14) "Embedded teeth" }
[1]=> object(stdClass)#461 (1) { ["deskripsi"]=> string(14) "Impacted teeth" } 
}

That is my array result after I vardump from database query. Then I want to get text Embedded teeth and Impacted teeth

Can someone please help me?

2
  • post your code how you tried to get Embedded teeth and Impacted teeth value Commented Jul 26, 2017 at 15:47
  • Where's the error? That's just some output followed by you asking how to get a value. What have you tried? Commented Jul 26, 2017 at 15:48

1 Answer 1

2

You have an array of objects, the code below should help point you in the right direction

$objects = $myObj;
foreach($objects as $object){
    echo $object->deskripsi;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.