R
R
Ramiro Disango2018-08-09 15:21:35
PHP
Ramiro Disango, 2018-08-09 15:21:35

How to get value from php object?

Hi all. I'm stupid on the gesture.
Here is the object I output via print_r

print_r($val_years);

Результат
SimpleXMLElement Object
(
    [0] => 2007 - 2011
)

How can I get the value at index 0?
$val_years[0]
does not channel)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Derepko, 2018-08-09
@Ramiro_Disango

(string) $val_years[0]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question