Array problem ...
The code is as follows
foreach ($url as $val) {
if ($netbot->fetchlinks ($val)) {
$urlarray [] = $netbot->results;
}else{
echo "Error:". $netbot->error;
Exit
}
}
This is an array, storing the address
Through the Snoopy method, $netbot->fetchlinks ($val) to get all the link for this URL
So, I want to put all the link in an array
$netbot->results Returns a one-dimensional array
The question now is: $urlarray [] = $netbot->results;
This method assigns a value that gets a multidimensional array
The link in it is only the first time he visited the URL links
I want this $urlarray to be transferred automatically.
When you get the second URL, when you assign a value, you can inherit the subscript above, transforming $urlarray into a 1-dimensional array.
How can this be achieved?
------Solution--------------------
Did the landlord give up?
It should be recycled in the first condition of the IF