A
A
Anton2019-02-25 16:18:25
PHP
Anton, 2019-02-25 16:18:25

How to get data from stdClass Object?

if ($out) {
  $jsObj = json_decode($out);
  if(null!=$jsObj) {
$tokenset = $jsObj->variables;
print_r ($tokenset[0] );
 }};

I get on the screen:
stdClass Object ( [name] => Промокод [type] => string [value] => CP-D4GOC )

How to easily display a value (CP-D4GOC), without all the extra stuff?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2019-02-25
@anton99zel

$jsObj = json_decode($out, true);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question