I am trying to get an array from listing a flat-text file, then split each value that is delimited by a certain character "|" and assign variables to each of those values. I know how to do this with perl but I am having a helluva time to do this within php...
<snip>
@raw_inventory = cat ../dbinfo/inventory.db | grep -v "#";
for $inventory_detail (@raw_inventory) {
($SKU, $CATEGORY, $SHORT_DESCRIPTION, $LONG_DESCRIPTION, $APPLICATION, $PRICE) = split /|/, $inventory_detail ;
Print each value once for each line...
i.e. echo "$SKU, $CATEGORY, etc";
}
<snip>
Any suggestions? Thanks.
Vinnie