Hossein Bustanchi
Hossein Bustanchi

Reputation: 81

how get value of array in php code

i want get value of array in php , but it don't ... my print_r($_POST) is :

Array
(
    [form] => Array
        (
            [site_core_selection] => Array
                (
                    [0] => 
                )

            [domain] => Array
                (
                    [0] => com
                )

            [hidden_premier] => 
            [shoping_hidden] => 
            [submit] => تائید سفارش
            [formId] => 3
        )

)

i want get value of domain[0] , please help me ??

Upvotes: 2

Views: 69

Answers (2)

rdn87
rdn87

Reputation: 724

In php is very simple, try this code:

<?php
   echo $_POST["form"]["domain"][0];
?>

Upvotes: 1

Little Phild
Little Phild

Reputation: 805

Try out this

<?php
echo $_POST['form']['domain'][0];
?>

Upvotes: 3

Related Questions