This is my part of code:
for( $i = $aKeys['iStart']; $i < $aKeys['iEnd']; $i++ )
{
$aData = $this->aProducts[$aProducts[$i]];
$content .= '"'.$aData['sName'].'"';
if ($i < $aKeys['iEnd'])
{
$content .= ', ';
}
$i2++;
}
Full code gives me this as result:
["word1", "word2", "word3", ]
This is a simple array, which I will use, but this won't work because after word3 there is a comma sign. How to write this if statement to get result like: ["word1", "word2", "word3"] ?
array_push();to eliminate the comma thingy :)