私はこの文字列を持っています
$s = 'Yo be [diggin = array("fruit"=> "apple")] scriptzors!';
その後、によってチェックされます
$matches = null;
preg_match_all('/\[(.*?)\]/', $s, $matches);
var_dump($matches[1]);
しかし、私がそれをしたいのは次のことです、それは次を返すはずです
print "yo be";
$this->diggin(SEND ARRAY HERE);
print "scriptzors!";
以下の回答で問題を表示するために編集
$s = 'Yo be [diggin = array("fruit"=>"apple")] scriptzors!';
$matches = null;
preg_match_all('/\[(.*?)\]/', $s, $matches);
$var = explode(' = ', $matches[1]);
print $var[0]; //THIS DOES NOT PRINT