K
K
Kar922017-08-14 00:58:38
JavaScript
Kar92, 2017-08-14 00:58:38

Why is array() always printed?

11de725dda9e4762acf73624ddecd034.png

function MessageShow()
{
    $Message = "";
    if (isset($_SESSION['message'])) $Message = $_SESSION['message'];
    print_r($Message);
    $_SESSION['message'] = array();
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
0
0xD34F, 2019-04-04
@Mestniydevil

const getProp = (obj, path) => path.split('.').reduce((p, c) => p ? p[c] : null, obj);

const id = getProp(e, 'path.1.attributes.uid.textContent');

Or is there such a thing .

K
Kar92, 2017-08-14
@Kar92

if (isset($_SESSION['message']) and $_SESSION['message']!=null) {
        $Message = $_SESSION['message'];
        print_r($Message);
    }
    $_SESSION['message'] = array();

T
twobomb, 2017-08-14
@twobomb

Because it contains an empty array. $_SESSION['message']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question