I'm using preg_match for performing a regular expression match, but before using it I declared my array with specific keys as follows:
$record = array ( "title" => '',
"review" => '',
"publisher" => '',
);
and here I call the function
$record = preg_split( "/(\s\|\s)|(\s\|)/", $data, 4 );
If I try to use the array with
echo $record['title'];
I got the following message error:
PHP Notice: Undefined index: title
Is there a way to preserve my keys?