W
W
wolverine7772019-05-22 17:53:04
symfony
wolverine777, 2019-05-22 17:53:04

HOW to pull out a parameter from an array?

Hello, please tell me how to get a parameter from an array.
Here's what I have in the request
5ce5623e16147704254629.jpeg
. And here's what I can get so far..
5ce562469546f622895677.jpeg
And I would like only the 'titre' field.

$val=$request->request->get('new_liseuse', ['titre']); // 
        dump($val);

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2019-05-23
@Maksclub

$request->request->get('new_liseuse')['titre']
to make it clear:

$array = $request->request->get('new_liseuse');
var_dump($array['titre']);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question