从复杂的多维数组中获取价值

I am an intermediate trying to sort out a code in WordPress plugin, to figure out price and store it in different variable from the following complex code, which might sound poetry to some experts like you :)

$one_email->sendMessage('booking_with_approval',
                        $language,
                        $_POST['calendar_id'], 
                        $reservationId,
                        $_POST['check_in'],
                        $_POST['check_out'],
                        $_POST['start_hour'],
                        $_POST['end_hour'],
                        $_POST['no_items'],
                        $_POST['currency'],
                        $_POST['price'],
                        $_POST['deposit'],
                        $_POST['total_price'],
                        $_POST['discount'],
                        $form,
                        $_POST['no_people'],
                        $_POST['no_children'],
                        $_POST['email'],
                        true,
                        true);

Is booking_with_approval a function with a new set of array?

I just need to call the specific key of total price in to $my_total_price.

I tried this but failed.

$my_total_price = $booking_with_approval. [ $_POST['total_price']]

Grateful for your precious time and assistance.

Reading the code you gave us, i think this should be a pretty easy thing to do.

sendMessage is a function which is within the class set by $one_email. Code further up the page will be something like this

$one_email = new email();

and witihn the email class there will be a function called sendMessage.

if your trying to set the variable $my_total_price on the page then it should be simple to get it called. see below:

$my_total_price = $_POST['total_price'];

If your trying to do it within the file where the sendMessage function is, we will need to see the code for the function.