Question
Hi, i have to store multiple data in array. up to 20.but when i am trying to add more data in this array,it getting error.how
Hi, i have to store multiple data in array. up to 20.but when i am trying to add more data in this array,it getting error.how can i store multiple data? i am using php language.i have created a simple text file.
Watch Jacket Sunglasess Headphone Backpack Shoes Iphone Handbag T-Shirt Pendrive Book Iphone-cover Perfume Earrings Laptop Bracelet Jewlery Home Decore Wallet Giftset -Milk Bread Banana apples Diapers Sunglasess Jewlery Home Decore Clothes Sweater Furniture T-Shirt Watch Iphone-cover Laptop Toys shampoo Pendrive Mattress Shirts -Furniture Book Laptop Tv Giftset Pendrive Shoes Perfume Handbag Diapers Jeans Clothes Bracelet Sweater Jwelery Lamp Bread Make-up Lotion Closet -Jeans Pendrive Lamp Banana Earrings Sunglasess Sweater Shirts Clothes Milk Iphone Lamp Shampoo Lotion Bread Charger Frozen-food Sofa Make-up Cream -Bread Furniture Bed-sheet Jeans Iphone Lotion Bracelet Make-up Laptop Clothes Sunglasess Toys Sweater Perfume flowers Lamp Tv Diapers Wallet jacket.and i have to store this data in the following function:
function apriori($data,$title=NULL){ echo isset($title)?"
".$title."
":""; //echo "";print_r($data);echo ""; print_transaction($data,$title); $no_trans=count($data); echo "
Step 1: Find all Frequent Itemsets
"; $result[0]=$data; $step=1; $frequent_item=array(array(),array()); do{ $c=array_consolidate($result[0]); //echo "c-->";print_r($c);echo ""; $bl=build_candidate($c,$step); //echo "
b_$step-->";print_r($bl);echo ""; print_itemset($bl,$step,1); $jo=join_step($data,$bl); //echo "
j_$step-->";print_r($jo);echo ""; print_support($jo,$step,"Join C"); $result=prune_data($jo,$no_trans,MIN_SUPPORT); $frequent_item[0]=array_merge($frequent_item[0],$result[0]); $frequent_item[1]=array_merge($frequent_item[1],$result[1]); //echo "
p_$step-->";print_r($result);echo ""; print_support($result,$step,"Prune L"); $step++; }while(!empty($result) && count($result[0])>1);
print_support($frequent_item,"","Frequent Itemsets"); echo "
Step 2: Generate strong association rules
";$rule=association_rule($frequent_item); //echo "
rule-->";print_r($rule);echo ""; print_association_rule($rule,"Association Rules"); }
so,how can i fetch data from textfile?please help me
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started