I have a $_POST request in which my values are coming like,
Array
(
[name] => hello
[category] => world
)
This i am sending it in a method search_data($_POST)
.
But when i do $_POST['$name'] it says,
undefined offset $name
How do I get the value in the array when the key is not defined in the code and is coming in a post request.