R
R
redd_i2018-03-15 20:59:09
PHP
redd_i, 2018-03-15 20:59:09

Why isn't it displaying a value?

Good evening everyone) There was a problem with the withdrawal. I have a two dimensional php array with data

$new = [
  '0' => [ 
    'header_title' => 'супер текст',
  'number' => '24324234242'
  ]
];

one person suggested to me how to simplify the output:
require_once("language.php");
$lang = 0;
$drill = array_values($new)[$lang];
echo "Заголовок: ".$drill->header_title;

But the value does not display(Please tell me what is the problem. I am not friends with PHP(Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-03-15
@redd_i

Good evening.
Because it would be more correct to do so . And turn on error output in the browser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question