Array-related issues.

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.