I have this PHP code:
<?php
$gen["demo1"][] = 1;
$gen["demo1"][] = 2;
$gen["demo1"][] = 5;
$gen["demo1"][] = 6;
$gen["demo1"][] = 9;
$gen["demo1"][] = 10;
$gen["demo1"][] = 11;
//etc...
$content = "show_demo(";
for($i=0; $i < count($gen["demo1"]); $i++) {
$content .= "\"".$gen["demo1"][$i]."\",";
}
$content .= ")";
$content = str_replace("\",)","\")", $content);
echo $content;
?>
which basically outputs:
show_demo("1","2","5","6","9","10","11");
what I need, which I am confused on, is this:
show_demo("1","2","5");
show_demo("6","9","10");
show_demo("11");
I've been trying to figure this out, but nothing succeeded.