array_keys($_POST) will give you array keys.
You can also do this to get values ββwith key names:
foreach ($_POST as $key => $value)
{
}
However!!! Why don't you know which keys are in this post? You do not want hackers to put random things in a message, send it to you and process it. Nothing prevents them from posting 1000 entries.
source
share