PHP
Chilkat2 PHP
Load StringTable from a StringBuilder
Demonstrates how to load a StringTable from the text contained in a Chilkat StringBuilder object.Chilkat PHP Downloads
<?php
use Chilkat2\StringBuilder;
use Chilkat2\StringTable;
$strTab = new StringTable();
$sb = new StringBuilder();
$sb->Append("This is line 1\r\n");
$sb->Append("An empty line follows...\r\n");
$sb->Append("\r\n");
$sb->Append("This is line 4\r\n");
$strTab->AppendFromSb($sb);
$i = 0;
$numStrings = $strTab->Count;
while ($i < $numStrings) {
echo $i, ': ', $strTab->StringAt($i), "\n";
$i = $i + 1;
}