Implementation of the product presentation in PHP $classify=array ("") method how to add a product description category into a TXT file

Source: Internet
Author: User
Keywords PHP class
PHP class

Implemented by reading a TXT document for product presentation, how to add product description according to different product categories?

Plantslist.txt:
$plantsclassify =array ("Product category", "Product category", "Product Type");
$ product Category =array ("Product name", "Introduction", Price), Array ("Name", "Introduction", Price), Array ("Name", "Introduction", price));
$ product Category =array ("Product name", "Introduction", Price), Array ("Name", "Introduction", Price), Array ("Name", "Introduction", price));
$ product Category =array ("Product name", "Introduction", Price), Array ("Name", "Introduction", Price), Array ("Name", "Introduction", price));
?>

Include ("Plantslist.txt");
foreach ($plantsclassify as $classify)
{
echo "$classify";
}
echo "View shopping cart";
if (isset ($_get["Catalog"]))
{
$catalog =$_get["Catalog"];
$_session["Catalog"]= $catalog;
echo "

";
echo "



















"; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; foreach ($ $catalog as $plants) {echo ' "; foreach ($plants as $val) {echo ' "; } echo " "; echo " "; } echo " "; echo " "; echo " "; echo "
Plant nameMore informationPriceBuy
$val
";
echo "";
}
if (Isset ($_get["Success"))
{
if ($_get["Success"]==0)
{
echo "Alert (' Please choose plants ')";
}
if ($_get["Success"]==1)
{
echo "alert (' added to cart! ')";
}
}
?>
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.