我正在尝试在 php 中继续未定义的偏移代码

I'm trying to continue an undefined offset code in php

我在 php 中有代码。变量的值是空的,但如果变量是否为空,我想继续。

$str_array = explode(",",ltrim($e4view, ", "));

if (isset($str_array[0][1][2])) {
    $f4irst = $str_array[0];
    $s4econd = $str_array[1];
    $t4hird = $str_array[2];

    echo $f4irst + $s4econd + $t4hird;

你想这样做吗?

if (empty($str_array[0]) && empty($str_array[1] …) {