0

Here is two array I have, they are generated by a wordpress plugin and store in database.

[3] => Array (
    [label] => Email
    [value] => test@test.com
    [identifier] => field4
    [type] => email
    [page] => 1
    [page_name] => Step 1
    [width] => 100%
)

[3] => Array (
    [label] => Phone Number
    [value] => 555-555-5555
    [identifier] => field2
    [type] => oneLineText
    [page] => 1
    [page_name] => Step 1
    [width] => 100%
)

This is what I did, I know it looks stupid, don't judge...

if ($array[3]['label'] = 'Email') {
    echo $array[3]['value'].'<br>';
}

This doesn't change anything... It will still output the email and phone number. so I'm looking for an solution that will only output the email.

Hong
  • 67
  • 1
  • 1
  • 6

0 Answers0