M
M
marcussx2020-04-16 18:42:38
PHP
marcussx, 2020-04-16 18:42:38

What is the php error?

Tell me what's wrong?

Piece of code:

public function postsList($route) {
    $max = 10;
    $params = [
      'max' => $max,
      'start' => ((($route['page'] ?? 1) - 1) * $max),
    ];
    return $this->db->row('SELECT * FROM posts ORDER BY id DESC LIMIT :start, :max', $params);
  }


Parse error
: syntax error, unexpected '?' in W:\domains\php-blog-master\application\models\Main.php on line 35

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2020-04-16
@marcussx

It is not clear where you have line 35. But I suspect that he swears at ??, probably your puff version is less than 7.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question