I have a problem that someone might be able to help with. The following is a block of code from a project I am working on.
function Sniffer_INI() {
$ia= ini_get_all();
echo "<table width='100%'>";
echo "<tr align='center' valign='middle'><th width='20%'><b>Key</b></th><th width='35%'><b>Global Value</b></th><th width='35%'><b>Local Value</b></th><th width='10%'><b>Access</b></th></tr>";
while(list($key, $value)= each($ia)) {
echo "<tr align='middle'><td align='left'>" .$key ."</td><td align='center'>" .$ia[$key]['global_value'] ."</td><td align='center'>" .$ia[$key]['local_value'] ."</td><td align='center'>" .$ia[$key]['access'] ."</td></tr>";
}
echo "</table>";
}
The block is a custom function, which retrieves the 2D array of information from ini_get_all(), and assigns it to $ia. From there, the code creates a table, and steps through each key, and its respective sub-array. Everything works nice and neat, except for one problem. When the code produces its result, and the output is merged with the web page template that the sites it will be used on runs, it breaks the template, because the resulting table is too wide. Even though I have sizes for each cell set, HTML overrides them, because at least one of the results from the sub-array is a long string of possible values, each seperated by commas. Downside, is the fact that since there is no spaces between each possible value, only the comma, HTML forces it to display on the same line. What I need to do, is find a way to force the information to split at the commas, into seperate lines.
This is the contents of the line that is giving me trobule, minus the last value, which is only a single digit number.
Key: url_rewriter.tags
Value 1: a=href,area=href,frame=src,input=src,form=fakeentry Value 2: a=href,area=href,frame=src,input=src,form=fakeentry
I need to split them on the commas, and list one piece on each line of the cell.
Thanks;
Dark Tempest