troubleshooting Question

IF Statement

Avatar of twittoris
twittoris asked on
PHP
17 Comments1 Solution236 ViewsLast Modified:
I have a script that searches for a certain output from a cURL result.

If there is no link found how can I make it place the current search name in a seperate table and delete the entry from the table being used.
Something like this:

If ($i = NULL) //if no link found
Then
Insert $name[row] TABLE $table
Delete $name[row] TABLE $nametable



// grab all the on the page
$xpath = new DOMXPath($dom);
$hrefs = $xpath->evaluate("/html/body//a[starts-with(@href, 'SEARCHRESULT')]");


for  ($i = 0; $i < $hrefs->length; $i++) 
{
    $href = $hrefs->item($i);
    $url = $href->getAttribute('href');
    $purl = substr($url, 30,300);
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 17 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 17 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros