Hi, Frnds..I hope u r all fine.
I said,$something is equal to url1 and url2.This is not thing where is my result.
Please focus on this.
<?php
$something = array('google.com','php.net');
$result_array = array();
foreach($something as $links) {
$url_links = get_links_from_site($links); // ignore this.This is only supposed code which get links.
//here is the code which get the links from site
// suppose this links is link1 and link2.ok
// this result comes when it is execute first time
// my mean when $links is equal to 'google.com';
//here is the code which get the links from site
// suppose this links is link3 and link4.ok
// this result comes when it is execute second time
// my mean when $links is equal to php.net';
$result_array = $url_links;
}
print_r($result_array);
?>
Its ut put is Link3 and link4.
But i want to get the result Link1 , Link2 , Link3 and Link4.
Please focus that my result is not 'goole.com' and 'php.net'.
this is the links where I is my result.
I define the problem more.ok
<?php
$something = array('google.com','php.net');
$result_array = array();
foreach($something as $links) {
$url_links = get_links_from_site($links); // ignore this.This is only supposed code which get links.
//here is the code which get the links from site
// suppose this links is link1 and link2.ok
// this result comes when it is execute first time
// my mean when $links is equal to 'google.com';
//here is the code which get the links from site
// suppose this links is link3 and link4.ok
// this result comes when it is execute second time
// my mean when $links is equal to php.net';
$result_array = $url_links;
print_r($result_array);
}
?>
When u execute the $result_arrry in foreach loop then it gets the
result link1 , link2 , link3 and link4.
But when it is execute out side the foreach loop then it gets the
result link3 and link4.
This is the problem, I want to get the
result link1 , link2 , link3 and link4.
when it is result_array execute outside the foreach loop.
I think u can now understand this problem.
please help me ................thanks.........