PHP's array_map including keys

前端 未结 18 2768
抹茶落季
抹茶落季 2020-11-30 19:31

Is there a way of doing something like this:

$test_array = array(\"first_key\" => \"first_value\", 
                    \"second_key\" => \"second_valu         


        
18条回答
  •  心在旅途
    2020-11-30 20:04

    I'd do something like this:

     "first_value",
      "second_key" => "second_value",
    )));
    
    ?>
    

    Results:

    array(2) {
      [0]=>
      string(27) "first_key loves first_value"
      [1]=>
      string(29) "second_key loves second_value"
    }
    

提交回复
热议问题