Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15446 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81126 invoked by uid 1010); 15 Mar 2005 01:44:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81072 invoked from network); 15 Mar 2005 01:44:06 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 15 Mar 2005 01:44:06 -0000 X-Host-Fingerprint: 203.22.197.21 houston.au.fhnetwork.com FreeBSD 4.6-4.9 Received: from ([203.22.197.21:2557] helo=houston.familyhealth.com.au) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id A6/C9-31540-2ED36324 for ; Mon, 14 Mar 2005 20:44:03 -0500 Received: from houston.familyhealth.com.au (localhost [127.0.0.1]) by houston.familyhealth.com.au (Postfix) with ESMTP id C69D42501A for ; Tue, 15 Mar 2005 09:43:57 +0800 (WST) Received: from [192.168.0.40] (work-40.internal [192.168.0.40]) by houston.familyhealth.com.au (Postfix) with ESMTP id A6BBD24FCD for ; Tue, 15 Mar 2005 09:43:57 +0800 (WST) Message-ID: <42363E35.3010705@familyhealth.com.au> Date: Tue, 15 Mar 2005 09:45:25 +0800 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: php-dev Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: PHP array to char ** From: chriskl@familyhealth.com.au (Christopher Kings-Lynne) Hi, I'm working on some improvements to the pgsql extension and I would like to know how to convert a zval* that points to a PHP array to a char** that I can pass to the pgsql API functions. The API function takes const char** so it will not modify the string, but the string must exist for the duration of the API call... I've been looking at other code that does similar things, but I can't help wondering if there is a simple, straightforward way of doing it? Cheers, Chris