Fatal Error Call To Undefined Function Print_array
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: [RESOLVED] Fatal error: Call to undefined function: array() Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 07-09-2005,08:11 PM #1 Dawg View Profile View Forum Posts Visit Homepage Advanced Beginner Join Date Jan 2004 Location Ventura, Calif Posts 141 [RESOLVED] Fatal error: Call to undefined function: array() Here is the full error message: Fatal error: Call to undefined function: array() in /www/www.sailinganarchy.com/htdocs/classified/ad_display.php on line 40 Which is the line: while ($row = mysql_fetch_array($result, MYSQL_NUM)) from the code below. According to all the books I have it would work. I have one record in the table and the connectin seems to work so any thoughts would be great. ad_display.php PHP Code:
/*
$Ad=Null;
$msg=Null;
$id=0;
$user=Null;
$password=Null;
$ad_type=Null;
$item_type=Null;
$year=Null;
$make=Null;
$length=Null;
$price=Null;
$contact_name=Null;
$contact_email=Null;
$contact_phone=Null;
$location=Null;
$description=Null;
*/
$db="foo";
$tablename="tblSA_ClassifiedAd";
$connection
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP Fatal error: Call to undefined function how do I http://board.phpbuilder.com/showthread.php?10304116-RESOLVED-Fatal-error-Call-to-undefined-function-array() fix it? up vote 2 down vote favorite I've very new to PHP and am trying to get API (REST) to work with a site I'm currently working on. It works if I submit a form using AJAX but I want it to work without using AJAX. The code I'm using is: $_POST['email'], 'EmailType' => 'Html', 'dataFields' => array( http://stackoverflow.com/questions/29899403/php-fatal-error-call-to-undefined-function-how-do-i-fix-it array( 'Key' => 'FULLNAME', 'Value' => $_POST['name_first']." ".$_POST['name_last'] ), ) ); $contact = execute_post($postContactUrl, $data); $addContactToAddressBookUrl = 'https://apiconnector.com/v2/address-books/' . '123456' . '/contacts'; $book = execute_post($addContactToAddressBookUrl, $contact); function execute_post($url, $data){ $requestBody = json_encode($data, true); $ch = curl_init(); curl_setopt($ch, CURLAUTH_BASIC, CURLAUTH_DIGEST); curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password'); curl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Accept: ' . 'application/json' ,'Content-Type: application/json')); $responseBody = json_decode(curl_exec($ch)); curl_close($ch); return $responseBody; } ?> but when I try to add that to the page the form is on I get this error: PHP Fatal error: Call to undefined function execute_post() I've tried to fix it but nothing I do seems to work. I don't understand why it works with AJAX but not any other way. php share|improve this question asked Apr 27 '15 at 15:07 noobie_woobie 258 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote your function should be before your calling function method function execute_post(){ } $contact = execute_post($postContactUrl, $data); share|improve this answer answered Apr 27 '15 at 15:10 Ahmet Atak 275110 In PHP, you can call a function before defining it. Th
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
src:gosa. Reported by: "Andreas B. Mundt"