I generate an associate array via loop. I need to print it our into a file. Not oputput values, like in print_r, but actually print it as it would look in code. it'll be saved in an include file.
So I create something like
$myArray array("item1"=>"count1", "item2"=>"count2", "item3"=>"count3");
I've tried something like this:
// buffer for include file
echo '<?
$myArrayInclude = array('.implode(",", $myArray).');
?>';
but when I open include, all I have in it is:
// buffer for include file
<?
$myArrayInclude = array();
?>
Also, assuming that count1, count2 and count3 are numerical values, how do I find the highest number? Something to do with SORT isn't it?
😕