Jump to content

Array problem


ashishrathore
 Share

Recommended Posts

hi guys,i had got struc into a deep troubleplz help me outi am taking a line( in form of "s1;s2;s3;s4;s5;" something like that ) from a filecalled db.txtnow i want these s to take into an arrayi do this with the help of EXPLODE functionnw, when i start to print(or pass these values to sm other file) i get my result as Array (ie "Array" is printed) or "Array" is passed to the other filei want to print all those s in the file bt cant get thatplz help me out..for ur convenience i am giving the code that i am using--------------------code---------------------------------------------------------<?php$myarray=file('temp.txt');$h=0;foreach($clines as $c) { $clines=explode(';',$filename); $tmp=$c; $t[$h]=$tmp; $h++; } for($i=0;$i<$h;$i++) echo $l[$i]; ////////////////////// this prints "Array" instead of s's ///////}my text file is something like thissubcat11;subcat12;subcat13;subcat14;-------------------------------------------------------------------------

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...