Posts: 551
Name: surajit ray
Location: inside the heart of my friends
|
$lineArray = explode(':', $line);
This line explodes the line with ':'
now $lineArray is an array with three element e.g:101,AA batteries (pack of 2),2.99
$sku = trim($lineArray[0]);
assigns $sku a number, the product id.
Now it creates an associative array $CATALOG with the number:
LIKE,
$CATALOG[101] ['desc'] = AA batteries (pack of 2)
$CATALOG[101] ['price'] = 2.99
This is known as file parsing .
Is it clear?
__________________
Think+, work +, but not HIV + :)
|