Im a new bie to PHP..
I'm able to push the elements into an Array using array_push. It gives the output like this..
array(0) { }
array(1) { [0]=> string(28) "For all your PC requirements" }
array(2) { [0]=> string(28) "For all your PC requirements" [1]=> string(10) "Welcome to" }
My code is
if($msgIdFound == 1){
$parts = explode('msgid ', $line_of_text);
$fp = fopen("/home/bigc/Documents/msgids.csv","w");
array_push($msgIds,$m[1]);
$counter++;
var_dump($msgIds);
fputcsv($fp, $msgIds);
fclose($fp);
}
But, what I want the array looks like this.
array(array('For all your PC requirements'), array('Welcome to'))
Any help would be greatly appreciated.