23 lines
514 B
PHP
23 lines
514 B
PHP
<?php
|
|
|
|
$alias_string = "AA,BB,CC,";
|
|
$alias_extra = "";
|
|
if (strlen($alias_string) > 0) {
|
|
$pieces = explode(",", $alias_string);
|
|
$count_item = count($pieces);
|
|
for ($ii = 0; $ii < $count_item; $ii++) {
|
|
$this_element = trim(strtolower($pieces[$ii]));
|
|
if (strlen($this_element) > 0) {
|
|
$itm_str = "'" . $this_element . "'";
|
|
if ($ii > 0) {
|
|
$alias_extra .= ",";
|
|
}
|
|
$alias_extra .= $itm_str;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
echo $alias_extra;
|