Hi E's, In snippet code you can see the code I use for get keywords from google adwords api.
In the last lines you can see the variable that contains the keywords: "$service->response;".
If I change the last lines for:
.................
function show_xml($service) {
$newwords = $service->response; //remove echo $service->response;
}
echo $newwords; //view the values out of function
========================
The system don't give me any keywords, so I thing is because I just can see the keywords if I execute "echo $newwords;" inside the function.
But if I want get the values inside "$service->response;" out of the function, how I do?
I change too:
function show_xml($service) {
echo $service->response;
echo "\n";
}
FOR------------------------
function show_xml($service) {
return $service->response;
}
$newwords = show_xml($keyword_tool_service);
echo $newwords;
I get a error "Fatal error: Call to undefined function show_fault() in /home/tags/public_html/bastidores/api/adwords/index.php on line 38".
Line 38 is: "if ($keyword_tool_service->fault) show_fault($keyword_tool_service);".
$to_consider = $variation_lists['addition
($to_consider) .
' variation(s).' . "\n";
$more_specific = $variation_lists['moreSpec
($more_specific) .
' variation(s).' . "\n";
FOR-----------------------
$to_consider = $variation_lists['addition
echo ($to_consider) .
' variation(s).' . "\n";
$more_specific = $variation_lists['moreSpec
echo ($more_specific) .
' variation(s).' . "\n";
I change too:
function show_xml($service) {
echo $service->response;
echo "\n";
}
FOR-----------------------
function show_xml($service) {
return $service->response;
}
$newwords = show_xml($keyword_tool_ser
echo $newwords;
I get a error "Fatal error: Call to undefined function show_fault() in /home/tags/public_html/bas
Line 38 is: "if ($keyword_tool_service->fa
Please tell me what is wrong.
Regards, JC
Open in new window