tazeha Posted September 4, 2014 Share Posted September 4, 2014 Hello I write this script I want to update page every day or hour . <?php$arrtxt = file_get_contents('array.txt');$newarr = json_decode($arrtxt);//Select Name and Price from array $par1= array_column( $newarr, 0);$par2 = array_column( $newarr, 1);//Combine Name and Price array$c = array_combine($par1, $par2);foreach($c as $name=>$price){ echo 'Name:'.' '.$name.'<br />'.'<hr>'.PHP_EOL; echo 'price:'.' '.$price.'<br />'.'<hr>'.PHP_EOL;} Link to comment Share on other sites More sharing options...
niche Posted September 4, 2014 Share Posted September 4, 2014 What's your question? Link to comment Share on other sites More sharing options...
tazeha Posted September 5, 2014 Author Share Posted September 5, 2014 I fixed . used cron job Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now