I have an array of column widths + content that I need to process and build row based on them.
$content = array(
'100',
'80',
'25',
'25',
'25',
'25',
'50',
'50',
'-1',
'33.333333333333',
'33.333333333333',
'33.333333333333',
'50',
'50',
'100',
'16.666666666667',
'-1'
);
-1 means that this is not a column , but a text or shortcode and it should not be wrapped in to row.
from the above array desired processed array should be
$content = array(
'[row]100[/row]',
'[row]80[/row]',
'[row]25',
'25',
'25',
'25[/row]',
'[row]50',
'50[/row]',
'-1',
'[row]33.333333333333',
'33.333333333333',
'33.333333333333[/row]',
'[row]50',
'50[/row]',
'[row]100[/row]',
'[row]16.666666666667[/row]',
'-1'
);
I have tried a loop with a starting accumulator 0 that I was adding width from loop but is simply buggy.
Any help is appreciated.
16.666666666667doesn't have a[row]prepended to it?